[XPU] Enable rms_norm/act quant fusions (#43963)

Signed-off-by: zhenwei-intel <zhenwei.liu@intel.com>
Co-authored-by: Kunshang Ji <kunshang.ji@intel.com>
This commit is contained in:
liuzhenwei
2026-06-02 16:14:41 +00:00
committed by GitHub
co-authored by Kunshang Ji
parent 478b49ddec
commit 3f3e2702c2
4 changed files with 31 additions and 14 deletions
@@ -70,7 +70,11 @@ class ActivationQuantPattern(VllmPatternReplacement):
self.silu_and_mul_matcher = MatcherSiluAndMul()
def empty_quant(self, *args: Any, **kwargs: Any) -> torch.Tensor:
kwargs = {"dtype": self.quant_dtype, "device": "cuda", **kwargs}
kwargs = {
"dtype": self.quant_dtype,
"device": current_platform.device_type,
**kwargs,
}
return torch.empty(*args, **kwargs)