Python version >= 3.10
CUPTI Python has a dependency on nvidia-cuda-cupti and uses the CUPTI C library libcupti.so*.
CUPTI Python automatically searches for libcupti.so* from the nvidia-cuda-cupti package in the following locations (in order):
Virtual environment site-packages at <venv>/.../site-packages/nvidia/cu13/lib/libcupti.so* (when running inside a virtual environment)
System site-packages at <system-site-packages>/nvidia/cu13/lib/libcupti.so* (when using system Python, or when a virtual environment was created with --system-site-packages)
Additional site-packages directories at <site-packages>/nvidia/cu13/lib/libcupti.so* (any remaining directories from site.getsitepackages())
User site-packages at <user-site-packages>/nvidia/cu13/lib/libcupti.so* (if user site is enabled)
Fall back to the native loader (Linux: dlopen()). If the CUPTI library is not found in any site-packages directories, you can set the LD_LIBRARY_PATH environment variable to the directory containing libcupti.so*. When the CUDA Toolkit is installed, libcupti.so* is typically located under $CUDA_TOOLKIT_INSTALL_PATH/extras/CUPTI/lib64.
Example: If the CUDA_TOOLKIT_INSTALL_PATH is /usr/local/cuda-13.0:
CUPTI Python provides support for NVTX through the activity kinds cupti.cupti.ActivityKind.MARKER, cupti.cupti.ActivityKind.MARKER_DATA, and cupti.cupti.ActivityKind.NAME.
To enable proper collection of NVTX-related activity records, ensure the following setup:
Set the NVTX_INJECTION64_PATH environment variable to point to the same CUPTI shared library that CUPTI Python is using.
e.g. If CUPTI Python is using the CUPTI shared library from the nvidia-cuda-cupti package, the path should be: