[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:
co-authored by
Kunshang Ji
parent
478b49ddec
commit
3f3e2702c2
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user