Skip to content

Commit bf9734c

Browse files
committed
WIP (search priority updated in README.md but not in code)
1 parent 5d970f2 commit bf9734c

File tree

1 file changed

+12
-13
lines changed
  • cuda_bindings/cuda/bindings/_path_finder

1 file changed

+12
-13
lines changed

cuda_bindings/cuda/bindings/_path_finder/README.md

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,21 @@ strategy for locating NVIDIA shared libraries:
2424
The absolute path of the already loaded library will be returned, along
2525
with the handle to the library.
2626

27-
1. **Python Package Ecosystem**
28-
- Scans `sys.path` to find libraries installed via NVIDIA Python wheels.
27+
1. **Environment variables**
28+
- Relies on `CUDA_HOME`/`CUDA_PATH` environment variables if set.
2929

30-
2. **Conda Environments**
31-
- Leverages Conda-specific paths through our fork of `get_cuda_paths()`
32-
from numba-cuda.
30+
2. **NVIDIA Python wheels**
31+
- Scans all site-packages to find libraries installed via NVIDIA Python wheels.
3332

34-
3. **Environment variables**
35-
- Relies on `CUDA_HOME`/`CUDA_PATH` environment variables if set.
33+
3. **OS default mechanisms / Conda environments**
34+
- Falls back to native loader:
35+
- `dlopen()` on Linux
36+
- `LoadLibraryW()` on Windows
37+
- Conda environments are expected to be covered by OS default mechanisms:
38+
- Based on `$ORIGIN/../lib` `RPATH` on Linux
39+
- Based on `%CONDA_PREFIX%\Library\bin` on the system `PATH` on Windows
3640

37-
4. **System Installations**
41+
5. **System Installations**
3842
- Checks traditional system locations through these paths:
3943
- Linux: `/usr/local/cuda/lib64`
4044
- Windows: `C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\vX.Y\bin`
@@ -44,11 +48,6 @@ strategy for locating NVIDIA shared libraries:
4448
- Distribution-specific packages (RPM/DEB)
4549
EXCEPT Debian's `nvidia-cuda-toolkit`
4650

47-
5. **OS Default Mechanisms**
48-
- Falls back to native loader:
49-
- `dlopen()` on Linux
50-
- `LoadLibraryW()` on Windows
51-
5251
Note that the search is done on a per-library basis. There is no centralized
5352
mechanism that ensures all libraries are found in the same way.
5453

0 commit comments

Comments
 (0)