cuda.pathfinder.locate_nvidia_header_directory#

cuda.pathfinder.locate_nvidia_header_directory(
libname: str,
) LocatedHeaderDir | 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:

A LocatedHeaderDir object containing the absolute path to the discovered header directory and information about where it was found, or None if the headers cannot be found.

Return type:

LocatedHeaderDir 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.