Python NVTX - Python code annotation library
Project Links
Meta
Author: NVIDIA Corporation
Classifiers
Intended Audience
- Developers
Topic
- Database
- Scientific/Engineering
License
- OSI Approved :: Apache Software License
Programming Language
- Python
- Python :: 3.6
- Python :: 3.7
- Python :: 3.8
- Python :: 3.9
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
nvtx Python package
Installation
Install using conda:
conda install -c conda-forge nvtx
...or using pip:
python -m pip install nvtx
Quick start
-
Annotate the parts of your Python code you wish to profile/analyze:
# demo.py import time import nvtx @nvtx.annotate(color="blue") def my_function(): for i in range(5): with nvtx.annotate("my_loop", color="red"): time.sleep(i) my_function()
-
Use NVIDIA Nsight Systems to collect profile data:
nsys profile -t nvtx python demo.py -
Visualize the results using the Nsight systems GUI:

Documentation
See here for detailed docs.
Release Notes
0.2.13
- Fix tracing with tools that do not implement
nvtxDomainIsEnabled. - Fix decorator ranges not ending when an exception is thrown.
- Fix automatic function name annotation for decorator ranges.
0.2.12
- Expose API via
domainobject for better performance. - No-OP when domain is disabled.
- Improved documentation.
0.2.13
Aug 04, 2025
0.2.12
May 25, 2025
0.2.11
Feb 21, 2025
0.2.10
Feb 16, 2024
0.2.8
Sep 05, 2023
0.2.7
Aug 24, 2023
0.2.6
Jul 19, 2023
0.2.5
May 24, 2022
0.2.4
Feb 02, 2022
0.2.3
Feb 04, 2021
0.2.2
Feb 04, 2021
0.2.1
Sep 22, 2020
0.2.0
Sep 22, 2020
0.1.0
Jul 21, 2020
0.1.dev1
May 27, 2020
Wheel compatibility matrix
| Platform | CPython 3.8 | CPython 3.9 | CPython 3.10 | CPython 3.11 | CPython 3.12 | CPython 3.13 |
|---|---|---|---|---|---|---|
| manylinux2014_aarch64 | ||||||
| manylinux2014_x86_64 | ||||||
| manylinux_2_17_aarch64 | ||||||
| manylinux_2_17_x86_64 | ||||||
| win_amd64 |
Files in release
nvtx-0.2.13-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (459.5KiB)
nvtx-0.2.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (463.0KiB)
nvtx-0.2.13-cp310-cp310-win_amd64.whl (96.8KiB)
nvtx-0.2.13-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (510.1KiB)
nvtx-0.2.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (510.6KiB)
nvtx-0.2.13-cp311-cp311-win_amd64.whl (96.8KiB)
nvtx-0.2.13-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (526.7KiB)
nvtx-0.2.13-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (532.8KiB)
nvtx-0.2.13-cp312-cp312-win_amd64.whl (96.8KiB)
nvtx-0.2.13-cp313-cp313-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (507.7KiB)
nvtx-0.2.13-cp313-cp313-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (512.4KiB)
nvtx-0.2.13-cp313-cp313-win_amd64.whl (95.0KiB)
nvtx-0.2.13-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (467.1KiB)
nvtx-0.2.13-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (470.5KiB)
nvtx-0.2.13-cp38-cp38-win_amd64.whl (97.9KiB)
nvtx-0.2.13-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (465.7KiB)
nvtx-0.2.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (468.7KiB)
nvtx-0.2.13-cp39-cp39-win_amd64.whl (97.8KiB)
nvtx-0.2.13.tar.gz (109.5KiB)