Skip to content

Commit c678cb0

Browse files
author
Peter Y. Yeh
committed
add GPU arch check for MI300x
1 parent a4e8c30 commit c678cb0

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

setup.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,12 @@ def get_extensions():
146146

147147
# TOOD: Remove this and use what CUDA has once we fix all the builds.
148148
if IS_ROCM and use_cuda:
149+
# Add ROCm GPU architecture check
150+
gpu_arch = torch.cuda.get_device_properties(0).name
151+
if gpu_arch != 'gfx942':
152+
print(f"Warning: Unsupported ROCm GPU architecture: {gpu_arch}")
153+
print("Currently only gfx942 is supported. Skipping compilation of ROCm extensions")
154+
return None
149155
sources += hip_sources
150156

151157
if len(sources) == 0:

0 commit comments

Comments
 (0)