Skip to content

Commit 3128dc7

Browse files
committed
Apply nccl test for linux only
1 parent 04ef1bf commit 3128dc7

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

test/smoke_test/smoke_test.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -163,14 +163,17 @@ def smoke_test_cuda(package: str, runtime_error_check: str) -> None:
163163
f"Wrong CUDA version. Loaded: {torch.version.cuda} Expected: {gpu_arch_ver}"
164164
)
165165
print(f"torch cuda: {torch.version.cuda}")
166-
print(f"torch nccl version: {torch.cuda.nccl.version()}" )
167166
# todo add cudnn version validation
168167
print(f"torch cudnn: {torch.backends.cudnn.version()}")
169168
print(f"cuDNN enabled? {torch.backends.cudnn.enabled}")
170169

171170
# torch.compile is available only on Linux and python 3.8-3.11
172-
if (sys.platform in ["linux", "linux2"]) and sys.version_info < (3, 12, 0):
173-
smoke_test_compile()
171+
# nccl is availbale only on Linux
172+
if (sys.platform in ["linux", "linux2"]):
173+
print(f"torch nccl version: {torch.cuda.nccl.version()}")
174+
175+
if(sys.version_info < (3, 12, 0)):
176+
smoke_test_compile()
174177

175178
if runtime_error_check == "enabled":
176179
test_cuda_runtime_errors_captured()

0 commit comments

Comments
 (0)