Something went wrong. Try again.
Nix Packages collection & NixOS github.com/NixOS/nixpkgs
Something went wrong. Try again.
2.6 kB · 71 lines
at master
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172--- a/examples/thread_block_cluster.py+++ b/examples/thread_block_cluster.py@@ -70,18 +70,8 @@ print("This example requires NumPy 2.2.5 or later", file=sys.stderr) sys.exit(1) - cuda_path = get_cuda_path_or_home()- if cuda_path is None:- print("This example requires CUDA_PATH or CUDA_HOME to point to a CUDA toolkit.", file=sys.stderr)- sys.exit(1)- cuda_include = os.path.join(cuda_path, "include")- if not os.path.isdir(cuda_include):- print(f"CUDA include directory not found: {cuda_include}", file=sys.stderr)- sys.exit(1)- include_path = [cuda_include]- cccl_include = os.path.join(cuda_include, "cccl")- if os.path.isdir(cccl_include):- include_path.insert(0, cccl_include)+ # Nixpkgs installs CCCL and the CUDA runtime headers in separate prefixes, not under one toolkit root.+ include_path = ["@cccl@", "@cudartInclude@"] dev = Device() arch = dev.compute_capability--- a/examples/tma_tensor_map.py+++ b/examples/tma_tensor_map.py@@ -108,21 +108,8 @@ def _get_cccl_include_paths():- cuda_path = get_cuda_path_or_home()- if cuda_path is None:- print("This example requires CUDA_PATH or CUDA_HOME to point to a CUDA toolkit.", file=sys.stderr)- sys.exit(1)-- cuda_include = os.path.join(cuda_path, "include")- if not os.path.isdir(cuda_include):- print(f"CUDA include directory not found: {cuda_include}", file=sys.stderr)- sys.exit(1)-- include_path = [cuda_include]- cccl_include = os.path.join(cuda_include, "cccl")- if os.path.isdir(cccl_include):- include_path.insert(0, cccl_include)- return include_path+ # Nixpkgs installs CCCL and the CUDA runtime headers in separate prefixes, not under one toolkit root.+ return ["@cccl@", "@cudartInclude@"] def main():--- a/tests/helpers/__init__.py+++ b/tests/helpers/__init__.py@@ -10,16 +10,9 @@ from cuda_python_test_helpers import * CUDA_PATH = get_cuda_path_or_home()-CUDA_INCLUDE_PATH = None-CCCL_INCLUDE_PATHS = None-if CUDA_PATH is not None:- path = os.path.join(CUDA_PATH, "include")- if os.path.isdir(path):- CUDA_INCLUDE_PATH = path- CCCL_INCLUDE_PATHS = (path,)- path = os.path.join(path, "cccl")- if os.path.isdir(path):- CCCL_INCLUDE_PATHS = (path,) + CCCL_INCLUDE_PATHS+# Nixpkgs installs CCCL and the CUDA runtime headers in separate prefixes, not under one toolkit root.+CUDA_INCLUDE_PATH = "@cudartInclude@"+CCCL_INCLUDE_PATHS = ("@cccl@", "@cudartInclude@") @functools.cache