[Kernel] Remove unused fake implementation (#55535)

Signed-off-by: Jee Jee Li <jeejeelee@inferact.ai>
This commit is contained in:
Jee Jee Li
2026-09-06 17:54:32 -07:00
committed by GitHub
parent 4df80187b5
commit 199cb9b964
39 changed files with 7 additions and 956 deletions
-13
View File
@@ -578,23 +578,10 @@ def _deepseek_v4_mega_moe_experts_op(
)
def _deepseek_v4_mega_moe_experts_op_fake(
hidden_states: torch.Tensor,
topk_weights: torch.Tensor,
topk_ids: torch.Tensor,
out: torch.Tensor,
layer_name: str,
activation_clamp: float | None,
fast_math: bool,
) -> None:
return None
direct_register_custom_op(
op_name="deepseek_v4_mega_moe_experts",
op_func=_deepseek_v4_mega_moe_experts_op,
mutates_args=["out"],
fake_impl=_deepseek_v4_mega_moe_experts_op_fake,
)
-18
View File
@@ -1082,14 +1082,6 @@ def qwen4_exp_amd_ple_ngram_embedding(
output.copy_(result)
def qwen4_exp_amd_ple_ngram_embedding_fake(
ngram_ids: torch.Tensor,
output: torch.Tensor,
layer_name: str,
) -> None:
return
def qwen4_exp_ple_short_conv(
inputs: torch.Tensor,
output: torch.Tensor,
@@ -1100,19 +1092,10 @@ def qwen4_exp_ple_short_conv(
output[: result.shape[0]].copy_(result)
def qwen4_exp_ple_short_conv_fake(
inputs: torch.Tensor,
output: torch.Tensor,
layer_name: str,
) -> None:
return
direct_register_custom_op(
op_name="qwen4_exp_amd_ple_ngram_embedding",
op_func=qwen4_exp_amd_ple_ngram_embedding,
mutates_args=["output"],
fake_impl=qwen4_exp_amd_ple_ngram_embedding_fake,
)
@@ -1120,7 +1103,6 @@ direct_register_custom_op(
op_name="qwen4_exp_ple_short_conv",
op_func=qwen4_exp_ple_short_conv,
mutates_args=["output"],
fake_impl=qwen4_exp_ple_short_conv_fake,
)
-13
View File
@@ -445,23 +445,10 @@ def qwen4_exp_qsa_with_output(
)
def qwen4_exp_qsa_with_output_fake(
hidden_states: torch.Tensor,
positions: torch.Tensor,
query: torch.Tensor,
key: torch.Tensor,
value: torch.Tensor,
output: torch.Tensor,
layer_name: LayerNameType,
) -> None:
del hidden_states, positions, query, key, value, output, layer_name
direct_register_custom_op(
op_name="qwen4_exp_qsa_with_output",
op_func=qwen4_exp_qsa_with_output,
mutates_args=["output"],
fake_impl=qwen4_exp_qsa_with_output_fake,
)
-20
View File
@@ -877,16 +877,6 @@ def qwen4_exp_compute_ple_ngram_ids(
)
def qwen4_exp_compute_ple_ngram_ids_fake(
input_ids: torch.Tensor,
query_start_loc: torch.Tensor,
ngram_context: torch.Tensor,
output: torch.Tensor,
layer_name: str,
) -> None:
return
def qwen4_exp_ple_short_conv(
inputs: torch.Tensor,
residual_output: torch.Tensor,
@@ -896,19 +886,10 @@ def qwen4_exp_ple_short_conv(
layer._short_conv(inputs, residual_output)
def qwen4_exp_ple_short_conv_fake(
inputs: torch.Tensor,
residual_output: torch.Tensor,
layer_name: str,
) -> None:
return
direct_register_custom_op(
op_name="qwen4_exp_compute_ple_ngram_ids",
op_func=qwen4_exp_compute_ple_ngram_ids,
mutates_args=["output"],
fake_impl=qwen4_exp_compute_ple_ngram_ids_fake,
)
@@ -916,7 +897,6 @@ direct_register_custom_op(
op_name="qwen4_exp_ple_short_conv",
op_func=qwen4_exp_ple_short_conv,
mutates_args=["residual_output"],
fake_impl=qwen4_exp_ple_short_conv_fake,
)
-13
View File
@@ -465,23 +465,10 @@ def qwen4_exp_qsa_with_output(
)
def qwen4_exp_qsa_with_output_fake(
hidden_states: torch.Tensor,
positions: torch.Tensor,
query: torch.Tensor,
key: torch.Tensor,
value: torch.Tensor,
output: torch.Tensor,
layer_name: LayerNameType,
) -> None:
del hidden_states, positions, query, key, value, output, layer_name
direct_register_custom_op(
op_name="qwen4_exp_qsa_with_output",
op_func=qwen4_exp_qsa_with_output,
mutates_args=["output"],
fake_impl=qwen4_exp_qsa_with_output_fake,
)