Skip to content

Commit 9285117

Browse files
authored
Exclude Apple M2 from XFAILs in NaN, Inf, and denorm sin and cos tests (#717)
As pointed out by @farzonl it appears that the sin and cos tests for NaN, Inf, and denorm floats passes on the Apple machine that ran this PR check: https://github.com/llvm/llvm-project/actions/runs/21695662617/job/62565234979?pr=179836 Since the machine name is 'm2-mbp' it seems to be an Apple M2 MacBook Pro. This PR adds a more AppleM# feature flags and excludes AppleM2 from the XFAIL for the NaN, Inf, and denorm sin and cos tests.
1 parent 7107b53 commit 9285117

3 files changed

Lines changed: 7 additions & 9 deletions

File tree

test/Feature/HLSLLib/cos.nan-inf-denorm.32.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ DescriptorSets:
6363
# XFAIL: Vulkan && MoltenVK
6464

6565
# Bug: https://github.com/llvm/offload-test-suite/issues/701
66-
# XFAIL: Metal && !AppleM1 && Clang
66+
# XFAIL: Metal && !AppleM1 && !AppleM2 && Clang
6767

6868
# RUN: split-file %s %t
6969
# RUN: %dxc_target -Gis -T cs_6_5 -Fo %t.o %t/source.hlsl

test/Feature/HLSLLib/sin.nan-inf-denorm.32.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ DescriptorSets:
6363
# XFAIL: Vulkan && MoltenVK
6464

6565
# Bug: https://github.com/llvm/offload-test-suite/issues/701
66-
# XFAIL: Metal && !AppleM1 && Clang
66+
# XFAIL: Metal && !AppleM1 && !AppleM2 && Clang
6767

6868
# RUN: split-file %s %t
6969
# RUN: %dxc_target -Gis -T cs_6_5 -Fo %t.o %t/source.hlsl

test/lit.cfg.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,11 @@ def setDeviceFeatures(config, device, compiler):
104104
config.available_features.add("AMD")
105105
if "Qualcomm" in device["Description"]:
106106
config.available_features.add("QC")
107-
if "Apple M1" in device["Description"]:
108-
# As tracked by issue
109-
# https://github.com/llvm/offload-test-suite/issues/701, Apple M1 Macs
110-
# appear to be handling NaN, Inf, and denorm 32-bit floating-point
111-
# values correctly while newer SoCs are not, even with the -Gis compiler
112-
# flag.
113-
config.available_features.add("AppleM1")
107+
108+
appleSilicon = re.search(r"\bApple M(\d+)\b", device["Description"])
109+
if appleSilicon:
110+
gen = appleSilicon.group(1)
111+
config.available_features.add(f"AppleM{gen}")
114112

115113
HighestShaderModel = getHighestShaderModel(device["Features"])
116114
if (6, 6) <= HighestShaderModel:

0 commit comments

Comments
 (0)