[Kernel] Remove unused fake implementation (#55535)
Signed-off-by: Jee Jee Li <jeejeelee@inferact.ai>
This commit is contained in:
@@ -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,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
|
||||
|
||||
|
||||
@@ -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,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user