Skip to content

Commit 3a77641

Browse files
committed
Fix ROCm GPU architecture detection in setup.py
Update GPU architecture check to use gcnArchName and improve detection of gfx942 support
1 parent ce05b3f commit 3a77641

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -363,8 +363,8 @@ def get_extensions():
363363
# TOOD: Remove this and use what CUDA has once we fix all the builds.
364364
if IS_ROCM and use_cuda:
365365
# Add ROCm GPU architecture check
366-
gpu_arch = torch.cuda.get_device_properties(0).name
367-
if gpu_arch != "gfx942":
366+
gpu_arch = torch.cuda.get_device_properties(0).gcnArchName
367+
if "gfx942" not in gpu_arch:
368368
print(f"Warning: Unsupported ROCm GPU architecture: {gpu_arch}")
369369
print(
370370
"Currently only gfx942 is supported. Skipping compilation of ROCm extensions"

0 commit comments

Comments
 (0)