Getting Started¶
Runtime requirements¶
- CUDA Toolkit version 13.0
Only the NVRTC redistributable component is required from the CUDA Toolkit. CUDA Toolkit Documentation Installation Guide can be used for guidance.
Note that the NVRTC component in the Toolkit can be obtained via PYPI, Conda or Local Installer.
Python version >= 3.9
Installing from PyPI¶
$ pip install cupti-python
Setting for CUPTI C Library¶
CUPTI Python has a dependency on
nvidia-cuda-cupti
. It uses the CUPTI C librarylibcupti.so*
fromnvidia-cuda-cupti
.However, if
nvidia-cuda-cupti
is uninstalled, theLD_LIBRARY_PATH
environment variable needs to be set to the directory in whichlibcupti.so*
is present. When the CUDA Toolkit is installed,libcupti.so*
is present under$CUDA_TOOLKIT_INSTALL_PATH/extras/CUPTI/lib64
.e.g. If the
CUDA_TOOLKIT_INSTALL_PATH
is/usr/local/cuda-13.0
:
$ export LD_LIBRARY_PATH=/usr/local/cuda-13.0/extras/CUPTI/lib64
NVTX Configuration¶
CUPTI Python provides support for NVTX through the activity kinds
cupti.cupti.ActivityKind.MARKER
,cupti.cupti.ActivityKind.MARKER_DATA
, andcupti.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:
$ export NVTX_INJECTION64_PATH=<site-packages>/nvidia/cu13/lib/libcupti.so.13