Skip to content

Commit 43e7867

Browse files
CaoEchunyuan-w
andauthored
add check of ATEN_CPU_CAPABILITY for skipIfNoVNNI (#3595)
Co-authored-by: Chunyuan WU <chunyuan.wu@intel.com>
1 parent f1f3864 commit 43e7867

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

tests/cpu/test_ao_jit_llga_utils.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import copy
2+
import os
23
import unittest
34
import torch
45
from torch.ao.quantization import MinMaxObserver, PerChannelMinMaxObserver, QConfig
@@ -35,7 +36,8 @@
3536

3637
skipIfNoTorchVision = unittest.skipIf(not HAS_TORCHVISION, "no torchvision")
3738
skipIfNoVNNI = unittest.skipIf(
38-
not core.isa_has_avx512_vnni_support(),
39+
not core.isa_has_avx512_vnni_support()
40+
or os.getenv("ATEN_CPU_CAPABILITY") in ["default", "avx2"],
3941
"OneDNN int8 GEMM may overflow without AVX512_VNNI",
4042
)
4143

0 commit comments

Comments
 (0)