[NPU] fix: skip Triton embedding kernel on NPU to avoid kernel launch failure (#31636)

This commit is contained in:
chx96642264
2026-07-18 19:32:03 +08:00
committed by GitHub
parent 216b750c8f
commit d7b9425529
@@ -503,6 +503,8 @@ class VocabParallelEmbedding(torch.nn.Module):
def _use_triton_embedding(self, input_: torch.Tensor) -> bool:
"""Whether the fused Triton kernel can replace the mask+gather+fill unit."""
if _is_npu:
return False
if self.tp_size == 1:
return False
if not isinstance(self.quant_method, UnquantizedEmbeddingMethod):