Skip to content

Commit 2f6b2c6

Browse files
committed
[SPEC] Fix spec _filecheck.py, _internal_testing.py
1 parent 6876360 commit 2f6b2c6

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

python/triton/_filecheck.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
# Stub target for testing the frontend.
1919
# flagtree backend path specialization
2020
from triton.flagtree_spec import spec
21-
if not spec("spec_get_stub_target"):
21+
stub_target = spec("spec_get_stub_target")
22+
if not stub_target:
2223
stub_target = GPUTarget("cuda", 100, 32)
2324

2425
triton_dir = os.path.dirname(__file__)

python/triton/_internal_testing.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,17 @@ def is_hip_cdna4():
8282
return target is not None and target.backend == 'hip' and target.arch == 'gfx950'
8383

8484

85+
def is_hip_rdna3(): # Triton 3.7
86+
target = get_current_target()
87+
return target is not None and target.backend == 'hip' and 'gfx11' in target.arch
88+
89+
90+
def is_hip_rdna4(): # Triton 3.7
91+
target = get_current_target()
92+
# check for gfx120 instead of gfx12, to avoid matching gfx1250
93+
return target is not None and target.backend == 'hip' and 'gfx120' in target.arch
94+
95+
8596
def is_hip_gfx11():
8697
target = get_current_target()
8798
return target is not None and target.backend == 'hip' and 'gfx11' in target.arch

0 commit comments

Comments
 (0)