Skip to content

Commit 10511d3

Browse files
praguptajeffdaily
authored andcommitted
[ROCm][SymmMem] Fix skip condition for PLATFORM_SUPPORTS_SYMM_MEM (pytorch#163205)
It seems `TEST_CUDA` is set to true even for ROCm (MI200) jobs. Changing if TEST_CUDA to an else condition to avoid running symmetric memory UTs on MI200. For other non-rocm arch, it should return true and can be skipped using other skip decorators. Pull Request resolved: pytorch#163205 Approved by: https://github.com/ezyang Co-authored-by: Jeff Daily <[email protected]>
1 parent 8117e87 commit 10511d3

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

torch/testing/_internal/common_distributed.py

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -414,15 +414,17 @@ def requires_multicast_support():
414414

415415

416416
def evaluate_platform_supports_symm_mem():
417-
if TEST_WITH_ROCM:
418-
arch_list = ["gfx942", "gfx950"]
419-
for arch in arch_list:
420-
if arch in torch.cuda.get_device_properties(0).gcnArchName:
421-
return True
422417
if TEST_CUDA:
423-
return True
424-
425-
return False
418+
if TEST_WITH_ROCM:
419+
arch_list = ["gfx942", "gfx950"]
420+
for arch in arch_list:
421+
if arch in torch.cuda.get_device_properties(0).gcnArchName:
422+
return True
423+
return False
424+
else:
425+
return True
426+
else:
427+
return False
426428

427429

428430
PLATFORM_SUPPORTS_SYMM_MEM: bool = LazyVal(

0 commit comments

Comments
 (0)