[DOCS] Improve the introduction and installation section of the documentation#293
[DOCS] Improve the introduction and installation section of the documentation#293kkraus14 merged 7 commits intoNVIDIA:mainfrom
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. |
|
/ok to test |
docs/source/user/installation.rst
Outdated
|
|
||
| For CUDA 12, ``cuda-nvcc`` and ``cuda-nvrtc`` are required:: | ||
|
|
||
| $ conda install -c conda-forge numba-cuda cuda-nvcc cuda-nvrtc "cuda-version>=12.0" |
There was a problem hiding this comment.
Should we consider just adding these to the conda recipe?
There was a problem hiding this comment.
To add, once we depend on cuda-bindings in the conda recipe, cuda-nvrtc is already a dependency. What is cuda-nvcc needed for?
There was a problem hiding this comment.
I'm stretching my memory a bit here, but I think it might have been the only way to get libdevice installed (I'm not sure if that's still current).
There was a problem hiding this comment.
If it's only for libdevice then that comes from the cuda-nvvm-tools conda package these days that we should depend on instead.
There was a problem hiding this comment.
cuda-nvcc was probably used to provide libnvvm. I need to look it up and check which 12.x did we split it from nvcc-impl.
There was a problem hiding this comment.
I just remembered - if you want to run the full test suite, you need to have nvcc installed to build the test binaries. I don't know whether this means it makes sense to have it installed for end-users though.
There was a problem hiding this comment.
Should we consider just adding these to the conda recipe?
If I run
$ mamba create -n test-install-numba-cuda-015 python=3.12 nvidia::numba-cuda
(using the NVIDIA channel only because 0.15.0 is not yet on conda-forge right now)
then it will install (amongst others)
Package Version Build Channel Size
─────────────────────────────────────────────────────────────────────────────────────
Install:
─────────────────────────────────────────────────────────────────────────────────────
+ cuda-version 12.9 h4f385c5_3 conda-forge 22kB
+ cuda-nvvm-dev_linux-64 12.9.86 ha770c72_1 conda-forge 27kB
+ cuda-nvvm-tools 12.9.86 he02047a_1 conda-forge 24MB
+ cuda-nvvm-impl 12.9.86 he02047a_1 conda-forge 21MB
+ libnvjitlink 12.9.86 h5888daf_0 conda-forge 31MB
+ cuda-nvrtc 12.9.86 h5888daf_0 conda-forge 67MB
+ cuda-nvvm 12.9.86 h69a702a_1 conda-forge 25kB
+ cuda-bindings 12.9.0 py312h77ce6f0_0 conda-forge Cached
+ numba 0.61.2 py312h7bcfee6_1 conda-forge Cached
+ numba-cuda 0.15.0 py_0 nvidia Cached
so it looks like mamba install numba-cuda is going to be sufficient to pull in all required dependencies for running Numba-CUDA - I'll simplify the docs here.
docs/source/user/installation.rst
Outdated
| Setting CUDA Installation Path | ||
| ------------------------------ | ||
|
|
||
| Numba searches for a CUDA toolkit installation in the following order: |
There was a problem hiding this comment.
I think this order is for the ctypes based bindings and doesn't reflect the cuda-bindings based search order. For cuda-bindings it will follow the behavior described here: https://github.com/NVIDIA/cuda-python/tree/main/cuda_bindings/cuda/bindings/_path_finder#library-loading-search-priority
There was a problem hiding this comment.
Thanks - I didn't realise this until our sync meeting today, after I made this PR. Will update.
There was a problem hiding this comment.
Might be better to add a note explaining the search order might change in the future?
There was a problem hiding this comment.
I'll make it clear that the behaviour using the NVIDIA bindings follows path-finder's logic, and that the ctypes behaviour is for the deprecated path.
docs/source/user/installation.rst
Outdated
|
|
||
| if you are using Conda, or:: | ||
|
|
||
| $ pip install cuda-bindings[cu11] |
There was a problem hiding this comment.
Is cu11 an extra for cuda-bindings? Same with cu12 below
There was a problem hiding this comment.
No it is not. We should be doing cuda-bindings[all]==11 / cuda-bindings[all]==12. That being said, I think we should just advertise the numba-cuda[cuXX] path instead?
There was a problem hiding this comment.
I would be happy to change this but I'm not clear what the exact correct thing to write should be. Can you make a suggestion please?
There was a problem hiding this comment.
I believe we can just keep the text but remove all conda/pip install commands from this section. In the previous section, we already taught users how to install things, and cuda-bindings will be installed there. So, here we just need to teach users how to fall back to ctypes.
There was a problem hiding this comment.
Thanks Leo - I've now removed these, and it does read better.
|
@gmarkall the root README also has installation instructions that need to be updated 😅 |
Thanks for the reminder - I want to handle that in a separate PR when I can get round to it. My thinking here was that a little improvement is better than no improvement because I didn't have time to do both. |
These should already be installed by following the recommended install steps.
|
Thanks all - I believe I've now addressed all comments (and it does read better as a result!). |
|
/ok to test |
- NFC: Don't rely on `Dispatcher._compiler` API (NVIDIA#289) - [DOCS] Improve the introduction and installation section of the documentation (NVIDIA#293) - Fix `DeviceNDArray.device_ctypes_pointer` to always be ctypes (NVIDIA#295) - Raise better error when `cuda.bindings` are not available (NVIDIA#294)
Let me take care of this! |
The scope of these changes is to make it so that:
The Installation section here is mostly what was called "Overview" before - anything from that section that wasn't to do with installation was pushed into the next page that explains how to write kernels - I have not put much effort into improving that page here.
The Installation section should give users a good reference on how to install numba-cuda and have the required bindings installed and usable, or they should be able to disable the NVIDIA bindings if they don't want to use them.