Repository navigation
docs(cuda_core): document toolkit version pinning for PTX driver compatibility #3537
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -74,6 +74,44 @@ the CUDA Toolkit wheels, and let ``cuda-core`` choose the ``cuda-bindings`` vers | |||||
| A pin of your own can conflict with the floor of a later ``cuda-core`` release. | ||||||
|
|
||||||
|
|
||||||
| Matching CUDA Toolkit Version to System Driver (PTX Compatibility) | ||||||
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||||||
|
|
||||||
| When compiling PTX dynamically with ``cuda.core``'s compilation APIs, the resulting PTX ISA version | ||||||
| must be supported by the host system GPU driver. By default, installing ``cuda-core[cu12]`` or | ||||||
| ``cuda-core[cu13]`` resolves ``cuda-toolkit`` to the latest wheel release for that major version. If | ||||||
| your system display driver is older than the minimum driver required by that latest toolkit release, | ||||||
| attempting to JIT-compile and execute the PTX will fail with a driver mismatch or unsupported PTX version error. | ||||||
|
|
||||||
| To ensure PTX compatibility with your system's installed CUDA driver: | ||||||
|
|
||||||
| 1. **Use the system-installed CUDA Toolkit**: | ||||||
| If an appropriate CUDA Toolkit matching your driver is already installed on the system, install | ||||||
| only the bindings extra in a clean environment (or ensure conflicting wheels like ``nvidia-cuda-nvrtc-cu12`` | ||||||
| have been removed, as ``cuda.pathfinder`` inspects installed Python packages before system paths): | ||||||
|
|
||||||
| .. code-block:: console | ||||||
|
|
||||||
| $ pip install cuda-core[minimal-sysctk12] | ||||||
| # or for CUDA 13: | ||||||
| $ pip install cuda-core[minimal-sysctk13] | ||||||
|
|
||||||
| 2. **Constrain the Toolkit Wheel Version**: | ||||||
| If installing toolkit wheels via PyPI, constrain the NVRTC compiler wheel (e.g. ``nvidia-cuda-nvrtc-cu12`` or | ||||||
| ``cuda-toolkit[nvrtc]``) alongside ``cuda-toolkit`` so that ``pip`` does not resolve an unconstrained, newer | ||||||
| compiler package: | ||||||
|
|
||||||
| .. code-block:: console | ||||||
|
|
||||||
| $ pip install "cuda-core[cu12]" "nvidia-cuda-nvrtc-cu12<12.5" "cuda-toolkit<12.5" | ||||||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. important: Constrain the NVVM compiler wheel.
Suggested fix
Committable suggestion
|
||||||
|
|
||||||
| In Conda environments, pin ``cuda-version`` to the specific minor version: | ||||||
|
|
||||||
| .. code-block:: console | ||||||
|
|
||||||
| $ conda install -c conda-forge cuda-core cuda-version=12.4 | ||||||
|
|
||||||
|
|
||||||
| Installing from Conda (conda-forge) | ||||||
| ----------------------------------- | ||||||
|
|
||||||
|
|
||||||
Uh oh!
There was an error while loading. Please reload this page.