From 2f5a24c2a2d66156ffd0ae8785a8ebc589ddf6f6 Mon Sep 17 00:00:00 2001 From: atalman Date: Thu, 11 Sep 2025 16:09:20 +0000 Subject: [PATCH] Smoke tests don't run nvshmem on Windows (#162646) Only available for linux x86 and aarch64 : https://pypi.org/project/nvidia-nvshmem-cu13/#files nvshmem is available only on linux: `` "nvidia-nvshmem-cu12==3.3.24; platform_system == 'Linux' and platform_machine == 'x86_64' | " `` https://github.com/pytorch/pytorch/blob/main/.github/scripts/generate_binary_build_matrix.py#L57 Pull Request resolved: https://github.com/pytorch/pytorch/pull/162646 Approved by: https://github.com/kwen2501 --- .ci/pytorch/smoke_test/smoke_test.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.ci/pytorch/smoke_test/smoke_test.py b/.ci/pytorch/smoke_test/smoke_test.py index 305ad15d98e7..675d58a3e283 100644 --- a/.ci/pytorch/smoke_test/smoke_test.py +++ b/.ci/pytorch/smoke_test/smoke_test.py @@ -386,8 +386,8 @@ def smoke_test_compile(device: str = "cpu") -> None: def smoke_test_nvshmem() -> None: - if not torch.cuda.is_available(): - print("CUDA is not available, skipping NVSHMEM test") + if not torch.cuda.is_available() or target_os == "windows": + print("Windows platform or CUDA is not available, skipping NVSHMEM test") return # Check if NVSHMEM is compiled in current build @@ -396,7 +396,9 @@ def smoke_test_nvshmem() -> None: except ImportError: # Not built with NVSHMEM support. # torch is not compiled with NVSHMEM prior to 2.9 - if torch.__version__ < "2.9": + from torch.torch_version import TorchVersion + + if TorchVersion(torch.__version__) < (2, 9): return else: # After 2.9: NVSHMEM is expected to be compiled in current build