Skip to content

docs(cuda_core): document toolkit version pinning for PTX driver compatibility - #3537

Open
utkarshpatwa393-sys wants to merge 1 commit into
NVIDIA:mainfrom
utkarshpatwa393-sys:docs/system-cuda-ptx-compatibility-guidance
Open

utkarshpatwa393-sys wants to merge 1 commit into
NVIDIA:mainfrom
utkarshpatwa393-sys:docs/system-cuda-ptx-compatibility-guidance

Conversation

@utkarshpatwa393-sys

Copy link
Copy Markdown

Summary

Closes #3379.

When compiling PTX dynamically with cuda.core compilation APIs, the resulting PTX ISA version must be supported by the host GPU driver. Installing cuda-core[cu12] or cuda-core[cu13] pulls the newest available cuda-toolkit wheels for that major release, which can lead to driver mismatch / unsupported PTX errors on machines where the display driver has not been updated to match the newest toolkit release.

Changes

Added documentation in cuda_core/docs/source/install.rst outlining two recommended approaches to avoid driver mismatches:

  1. Using system-installed CUDA Toolkit: installing cuda-core[minimal-sysctk12] or cuda-core[minimal-sysctk13] to bind directly to a system toolkit compatible with the host driver.
  2. Constraining toolkit package versions: constraining cuda-toolkit<... with pip or pinning cuda-version=... with Conda.

…atibility

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 NVIDIA#3379

Signed-off-by: Utkarsh Patwa <utkarshpatwa393@gmail.com>
@copy-pr-bot

copy-pr-bot Bot commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-actions github-actions Bot added the cuda.core Everything related to the cuda.core module label Nov 23, 2026
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Explain Change →

Summary

Summary by CodeRabbit

  • Documentation
    • Added guidance for choosing CUDA toolkit versions compatible with the host driver when compiling and running PTX.
    • Documented options for using a system toolkit, selecting a specific toolkit wheel version, or pinning the CUDA version in Conda.

The installation guide explains how CUDA toolkit selection affects PTX compatibility with the host driver. It documents options for using a system toolkit or constraining the toolkit version for PyPI and Conda installations.

Changes: PTX and CUDA Toolkit Version Guidance

Layer / File(s) Summary
Document toolkit version selection
cuda_core/docs/source/install.rst
The guide describes potential driver and PTX compatibility errors when cu12 or cu13 selects a toolkit newer than the host driver supports. It documents use of a matching system toolkit with minimal-sysctk12 or minimal-sysctk13, a constrained cuda-toolkit wheel version, or a pinned Conda cuda-version.

Assessment against linked issues

Objective Addressed Explanation
Document how to select a toolkit version compatible with the system and host driver [#3379] ✅

Suggested reviewers: leofang, rwgk

Change: Other · Severity of issue fixed: Medium

Merge Risk: Moderate · up to 0d639

The new install guidance can leave users with a toolkit compiler newer than their driver supports. Following the system-toolkit steps over an existing cu12 install, or the CUDA 12 pip constraint command, may still produce unsupported-PTX errors. Correct the instructions before merging.

Architecture risk: Low · up to 0d639

The change affects 1 system.

Changed systems: cuda_core

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — cuda_core (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in cuda_core/docs/source/install.rst: Adds documentation that dynamically compiled PTX must be supported by the host driver, and that using the latest toolkit wheel selected by cu12 or cu13 can cause driver-mismatch or unsupported-PTX errors when the system driver is too old.
  • observed — Modified behavior in cuda_core/docs/source/install.rst: Documents using a matching system-installed toolkit with minimal-sysctk12 or minimal-sysctk13 instead of toolkit wheels.
  • observed — Modified behavior in cuda_core/docs/source/install.rst: Documents constraining the cuda-toolkit wheel version for PyPI installations or pinning cuda-version to a CUDA minor version in Conda.
Finishing Touches

Fix failing CI checks

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between edf1b31 and 0d63962.

Files selected for processing: 1

  • cuda_core/docs/source/install.rst

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.


.. code-block:: console

$ pip install cuda-core[minimal-sysctk12]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Major · Functional Correctness · Quick win

important: Account for previously installed toolkit wheels.

If the user previously installed cuda-core[cu12], this command does not remove the NVRTC wheel. Pathfinder searches installed wheels before the system toolkit, so the incompatible compiler can remain in use. Document a clean environment or removal of conflicting wheels. (nvidia.github.io)


.. code-block:: console

$ pip install "cuda-core[cu12]" "cuda-toolkit<12.5"

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Major · Functional Correctness · Quick win

important: Constrain the NVRTC wheel.

For CUDA 12, cuda-bindings[all] independently requires nvidia-cuda-nvrtc-cu12 without a version bound. The bare cuda-toolkit<12.5 metapackage does not constrain that wheel. Pip can therefore install a newer NVRTC and produce unsupported PTX. Request the matching cuda-toolkit[nvrtc] extra or explicitly constrain the NVRTC package. (pypi.org)

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cuda.core Everything related to the cuda.core module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DOC]: instructions to compile PTX compatible with system version of cuda-toolkit

1 participant