cuda.pathfinder.find_nvidia_header_directory#

cuda.pathfinder.find_nvidia_header_directory(libname: str) str | None#

Locate the header directory for a supported NVIDIA library.

Parameters:

libname (str) – The short name of the library whose headers are needed (e.g., "nvrtc", "cusolver", "nvshmem").

Returns:

Absolute path to the discovered header directory, or None if the headers cannot be found.

Return type:

str or None

Raises:

RuntimeError – If libname is not in the supported set.

Search order:
  1. NVIDIA Python wheels — site-packages directories from the descriptor.

  2. Conda environments — platform-specific conda include layouts.

  3. CUDA Toolkit environment variablesCUDA_HOME / CUDA_PATH.

  4. CTK root canary probe — subprocess canary (descriptors with use_ctk_root_canary=True only).

  5. System install directories — glob patterns from the descriptor.