From 0d639628f6324dcf7dde35692800bf1db81295c8 Mon Sep 17 00:00:00 2001 From: Utkarsh Patwa Date: Mon, 23 Nov 2026 16:59:11 +0530 Subject: [PATCH 1/2] docs(cuda_core): document toolkit version pinning for PTX driver compatibility When dynamically compiling PTX with cuda-core, the resulting PTX ISA version must be supported by the host system GPU driver. By default, installing cuda-core[cu12] or cuda-core[cu13] pulls the latest cuda-toolkit wheel release, which may require a newer driver than the host system possesses. Document how to ensure PTX and driver compatibility by either: 1. Using cuda-core[minimal-sysctk12/13] with a system-installed CUDA Toolkit. 2. Constraining the cuda-toolkit wheel version (e.g., cuda-toolkit<12.5) or conda cuda-version package to match host driver limits. Closes #3379 Signed-off-by: Utkarsh Patwa --- cuda_core/docs/source/install.rst | 36 +++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/cuda_core/docs/source/install.rst b/cuda_core/docs/source/install.rst index e8c3a39e0fe0..cbe94f450f6d 100644 --- a/cuda_core/docs/source/install.rst +++ b/cuda_core/docs/source/install.rst @@ -74,6 +74,42 @@ 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: + + .. 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 ``cuda-toolkit`` package version to match your + system driver's supported CUDA version: + + .. code-block:: console + + $ pip install "cuda-core[cu12]" "cuda-toolkit<12.5" + + 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) ----------------------------------- From eaee26a017863606e1f4ed04e0162d900a9dcf45 Mon Sep 17 00:00:00 2001 From: Utkarsh Patwa Date: Tue, 24 Nov 2026 12:07:59 +0530 Subject: [PATCH 2/2] docs(cuda_core): clarify conflicting wheels removal and constrain NVRTC wheel Signed-off-by: Utkarsh Patwa --- cuda_core/docs/source/install.rst | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cuda_core/docs/source/install.rst b/cuda_core/docs/source/install.rst index cbe94f450f6d..861846fcc761 100644 --- a/cuda_core/docs/source/install.rst +++ b/cuda_core/docs/source/install.rst @@ -87,7 +87,8 @@ 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: + 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 @@ -96,12 +97,13 @@ To ensure PTX compatibility with your system's installed CUDA driver: $ pip install cuda-core[minimal-sysctk13] 2. **Constrain the Toolkit Wheel Version**: - If installing toolkit wheels via PyPI, constrain the ``cuda-toolkit`` package version to match your - system driver's supported CUDA 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]" "cuda-toolkit<12.5" + $ pip install "cuda-core[cu12]" "nvidia-cuda-nvrtc-cu12<12.5" "cuda-toolkit<12.5" In Conda environments, pin ``cuda-version`` to the specific minor version: