-
Notifications
You must be signed in to change notification settings - Fork 54
Fix nvrtc resolution when CUDA_HOME env is set #314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually. Contributors can view more details about this message here. |
|
Thanks @ZzEeKkAa , is there a container or something similar I can use to reproduce the failure state? |
I was using just system install of ctk at I was following this instructions to setup system ctk: |
gmarkall
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks like it was incorrect previously, and that this makes it correct (I have not tested it, beyond inspecting where the NVRTC lib appears to be placed in a toolkit installation). I don't think we do any testing with CUDA_HOME, so I can imagine this could have been non-working since it was last modified.
gmarkall
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On main, when I run:
CUDA_HOME=/usr/local/cuda-12.8 NUMBA_CUDA_USE_NVIDIA_BINDING=0 gdb --args python -c "from numba import cuda; cuda.cudadrv.libs.test(); input()"
I get
Finding driver from candidates:
libcuda.so
libcuda.so.1
/usr/lib/libcuda.so
/usr/lib/libcuda.so.1
/usr/lib64/libcuda.so
/usr/lib64/libcuda.so.1
Using loader <class 'ctypes.CDLL'>
Trying to load driver... ok
Loaded from libcuda.so
Mapped libcuda.so paths:
/usr/lib/x86_64-linux-gnu/libcuda.so.570.133.20
Finding nvvm from CUDA_HOME
Located at /usr/local/cuda-12.8/nvvm/lib64/libnvvm.so.4.0.0
Trying to open library... ok
Finding nvrtc from CUDA_HOME
Located at libnvrtc.so
Trying to open library... ok
Finding cudadevrt from CUDA_HOME
Located at /usr/local/cuda-12.8/lib64/libcudadevrt.a
Checking library... ok
Finding libdevice from CUDA_HOME
Located at /usr/local/cuda-12.8/nvvm/libdevice/libdevice.10.bc
Checking library... ok
Include directory configuration variable:
CUDA_INCLUDE_PATH=/usr/local/cuda/include
Finding include directory from CUDA_INCLUDE_PATH Config Entry
Located at /usr/local/cuda/include
Checking include directory... ok
The nvrtc path was not located correctly - gdb info shared shows it found another nvrtc.so on the linker path:
0x00007ffef6352e10 0x00007ffef9654342 Yes (*) /usr/local/cuda-12.8/nvvm/lib64/libnvvm.so.4.0.0
0x00007ffef2643e80 0x00007ffef4c9fc92 Yes (*) /usr/local/cuda-12.6/targets/x86_64-linux/lib/libnvrtc.so
(nvvm.so also shown for comparison).
With this branch, the correct nvrtc library is loaded:
0x00007ffef6352e10 0x00007ffef9654342 Yes (*) /usr/local/cuda-12.8/nvvm/lib64/libnvvm.so.4.0.0
0x00007ffeefe1f170 0x00007ffef46b2892 Yes (*) /usr/local/cuda-12.8/lib64/libnvrtc.so.12.8.93
and the output is also as expected:
Finding nvrtc from CUDA_HOME
Located at /usr/local/cuda-12.8/lib64/libnvrtc.so.12.8.93
Trying to open library... ok
|
/ok to test |
- Add deadlock warnings to Stream.add_callback and Stream.async_done docstrings (NVIDIA#321) - `MemoryPointer`: ensure `CUdeviceptr` used with NVIDIA binding (NVIDIA#328) - Fix indexing GPUs with CUdevice object (NVIDIA#319) - Fix bindings: consistency of contexts, streams, and events, similar to NVIDIA#295 (NVIDIA#296) - Fix nvrtc resolution when CUDA_HOME env is set (NVIDIA#314)
- Add deadlock warnings to Stream.add_callback and Stream.async_done docstrings (#321) - `MemoryPointer`: ensure `CUdeviceptr` used with NVIDIA binding (#328) - Fix indexing GPUs with CUdevice object (#319) - Fix bindings: consistency of contexts, streams, and events, similar to #295 (#296) - Fix nvrtc resolution when CUDA_HOME env is set (#314)
- Add deadlock warnings to Stream.add_callback and Stream.async_done docstrings (NVIDIA#321) - `MemoryPointer`: ensure `CUdeviceptr` used with NVIDIA binding (NVIDIA#328) - Fix indexing GPUs with CUdevice object (NVIDIA#319) - Fix bindings: consistency of contexts, streams, and events, similar to NVIDIA#295 (NVIDIA#296) - Fix nvrtc resolution when CUDA_HOME env is set (NVIDIA#314)
libnvrtc.sois located in thelib64folder not in the separate folder. I guess it is a typo based on thenvvmlocation. Not sure about Windows path, but was following same logic asnvvmdoes, but without subfolder.UPD: probably won't be needed after #308