summarylogtreecommitdiffstats
path: root/setup.patch
blob: a9396e85aa91c7e32c95e82188abc421d03f3ddf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
--- setup.py	2026-06-05 20:26:46.000000000 +0800
+++ setup.py.new	2026-06-07 18:34:46.101429083 +0800
@@ -72,24 +72,7 @@
 
 
 def _should_build_cuda() -> bool:
-    force_cuda = os.getenv("FORCE_CUDA", "0") == "1"
-    if force_cuda:
-        return True
-    torch_cuda_version = getattr(torch.version, "cuda", None)
-    if CUDA_HOME is None or torch_cuda_version is None:
-        return False
-    nvcc_cuda_version = _get_nvcc_cuda_version()
-    if nvcc_cuda_version is None:
-        return False
-    if nvcc_cuda_version != torch_cuda_version:
-        logger.warning(
-            "Skipping TorchRL CUDA extension build because nvcc CUDA %s does not "
-            "match PyTorch CUDA %s. Set FORCE_CUDA=1 to build anyway.",
-            nvcc_cuda_version,
-            torch_cuda_version,
-        )
-        return False
-    return True
+    return False
 
 
 def _get_build_cuda_version() -> str | None: