cuda.pathfinder.find_bitcode_lib#

cuda.pathfinder.find_bitcode_lib(name: str, *, sm_arch: str | None = None) → str#

Find the resolved absolute path to a bitcode library.

Parameters:
  • name – Supported bitcode library name.

  • sm_arch – Target SM without the sm_ prefix, such as "90". See locate_bitcode_lib() for file selection.

Raises:
  • ValueError – If name is not a supported bitcode library. Also raised if the sm_arch string has an invalid format.

  • BitcodeLibNotFoundError – If the bitcode library cannot be found. Also raised if no file is configured for the request.

Example

Find libnvshmem_device_sm_100.bc if installed.

>>> from cuda.pathfinder import find_bitcode_lib
>>> path = find_bitcode_lib("nvshmem_device", sm_arch="100")