Update PVC XMX condition (#9901)

* update pvc xmx condition

* update condition

* update conditon
This commit is contained in:
Guancheng Fu 2024-01-15 15:42:15 +08:00 committed by GitHub
parent 6637860ddf
commit 9f34da7cdb

View file

@ -276,7 +276,10 @@ def use_xmx(x: torch.Tensor, qtype: int):
device in ["arc", "flex", "pvc"] device in ["arc", "flex", "pvc"]
and qtype in [SYM_INT4, SYM_INT8, FP8] and qtype in [SYM_INT4, SYM_INT8, FP8]
and ( and (
(device == "pvc" and 1 < x.size(0) <= 16)
or
(device != "pvc" and x.dtype == torch.float32 and 1 < x.size(0) <= 64) (device != "pvc" and x.dtype == torch.float32 and 1 < x.size(0) <= 64)
or 1 < x.size(0) <= 8 or
1 < x.size(0) <= 8
) )
) )