Skip to content

Commit 4b36d10

Browse files
committed
test: Detect Intel Sapphire Rapids as CPU model
Intel AMX support was introduced but it is only supported on Intel Sapphire Rapids at the moment. We have to skip Intel AMX tests on older processors. Signed-off-by: Takahiro Itazuri <[email protected]>
1 parent c1197ef commit 4b36d10

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

tests/framework/utils_cpuid.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ class CpuModel(str, Enum):
3232
INTEL_SKYLAKE = "INTEL_SKYLAKE"
3333
INTEL_CASCADELAKE = "INTEL_CASCADELAKE"
3434
INTEL_ICELAKE = "INTEL_ICELAKE"
35+
INTEL_SAPPHIRE_RAPIDS = "INTEL_SAPPHIRE_RAPIDS"
3536

3637

3738
CPU_DICT = {
@@ -40,6 +41,7 @@ class CpuModel(str, Enum):
4041
"Intel(R) Xeon(R) Platinum 8124M CPU": "INTEL_SKYLAKE",
4142
"Intel(R) Xeon(R) Platinum 8259CL CPU": "INTEL_CASCADELAKE",
4243
"Intel(R) Xeon(R) Platinum 8375C CPU": "INTEL_ICELAKE",
44+
"Intel(R) Xeon(R) Platinum 8488C": "INTEL_SAPPHIRE_RAPIDS",
4345
},
4446
CpuVendor.AMD: {"AMD EPYC 7R13": "AMD_MILAN", "AMD EPYC 9R14": "AMD_GENOA"},
4547
CpuVendor.ARM: {
@@ -83,6 +85,8 @@ def get_cpu_codename(default="Unknown"):
8385
result = re.match(r"^(.*) @.*$", cpu_model)
8486
if result:
8587
return CPU_DICT[CpuVendor.INTEL].get(result.group(1), default)
88+
# Some Intel CPUs (e.g. Intel Sapphire Rapids) don't include "@ <frequency>".
89+
return CPU_DICT[CpuVendor.INTEL].get(cpu_model, default)
8690
if vendor == CpuVendor.AMD:
8791
result = re.match(r"^(.*) [0-9]*-Core Processor$", cpu_model)
8892
if result:

0 commit comments

Comments
 (0)