Skip to content

Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.

cuDNN SDPA DTensor test: gate on a real CUDA device (#15582)

Daniel Hanb3c7886dc6a3
diff --git a/tests/test_cudnn_sdpa_grad_layout_dtensor.py b/tests/test_cudnn_sdpa_grad_layout_dtensor.py
index b02705a9ff6..5b68697df8e 100644
--- a/tests/test_cudnn_sdpa_grad_layout_dtensor.py
+++ b/tests/test_cudnn_sdpa_grad_layout_dtensor.py
@@ -13,6 +13,8 @@ import textwrap
import pytest
+from real_accelerator import has_real_cuda # tests/_shared, on sys.path via tests/conftest.py
+
torch = pytest.importorskip("torch")
_PROBE = textwrap.dedent(
@@ -70,7 +72,7 @@ def _free_port():
@pytest.mark.gpu
[email protected](not torch.cuda.is_available(), reason = "needs CUDA")
[email protected](not has_real_cuda(), reason = "needs CUDA")
@pytest.mark.skipif(
not (torch.distributed.is_available() and torch.distributed.is_nccl_available()),
reason = "needs NCCL",