Skip to content

[FEA] cuda.core: support NVRTC bundled headers (CUDA 13.3) #2363

Description

@leofang

Summary

NVRTC 13.3 ships bundled CUDA headers plus APIs to manage them — a big usability win for
pip-wheel-only environments that have no CTK installation to point include_path at:

Symbol Purpose
nvrtcGetBundledHeadersInfo(nvrtcBundledHeadersInfo* info, const char** errorLog) query available, compressedSize, uncompressedSize, cudaVersionMajor/Minor, numFiles
nvrtcInstallBundledHeaders(const char* installPath, unsigned int flags, const char** errorLog) extract bundled headers to a directory
nvrtcRemoveBundledHeaders(const char* installPath, const char** errorLog) remove a previous install
NVRTC_INSTALL_HEADERS_{FORCE_OVERWRITE,NO_WAIT,SKIP_IF_EXISTS} install policy flags
--use-bundled-headers=<dir> compile option (13.3 docs)

Adjacent: the new NVRTC_ERROR_BUSY (13.3) is plausibly tied to concurrent installs given the
NO_WAIT flag — to be confirmed during design; error mapping itself is automatic.

Interacts with the cuda-cccl dependency discussion (#691) and cuda.pathfinder's include-dir
discovery.

Design sketch (draft — needs design-meeting review)

Important

Starting point only, not a settled design — review in the cuda.core design meeting.

  • ProgramOptions.use_bundled_headers: str | bool (a True shorthand meaning "the managed
    default install location").
  • cuda.core.utils.install_bundled_headers(path=None, *, policy=...),
    remove_bundled_headers(path), bundled_headers_info() wrappers.
  • Optionally: Program auto-installs (opt-in) to a per-user cache dir on first use.

Open questions for the meeting:

  1. Who owns the default install location (per-user cache dir? env var? pathfinder-managed)?
  2. Concurrency/NO_WAIT policy and the NVRTC_ERROR_BUSY UX.
  3. Interplay with include_path, no_source_include, and pathfinder-discovered CTK headers.
  4. Should Program ever auto-trigger installs, or keep it strictly explicit?

References

-- Leo's bot

Metadata

Metadata

Assignees

No one assigned

    Labels

    cuda.coreEverything related to the cuda.core modulefeatureNew feature or requesttriageNeeds the team's attention

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions