Python NVTX - Python code annotation library
Project Links
Meta
Author: NVIDIA Corporation
Classifiers
Intended Audience
- Developers
Topic
- Database
- Scientific/Engineering
Programming Language
- Python
- Python :: 3.9
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
- Python :: 3.13
- Python :: 3.14
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.15
- Extend Domain API to accept keyword arguments for event attributes.
- Implement testing improvements.
0.2.14
- Add support for NumPy arrays as payloads.
- Set up support for free-threaded Python.
- Apply
NVTX_DISABLEenvironment variable toProfileclass.
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.15
Mar 18, 2026
0.2.14
Nov 27, 2025
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
Files in release
nvtx-0.2.15-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (750.5KiB)
nvtx-0.2.15-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (753.9KiB)
nvtx-0.2.15-cp310-cp310-win_amd64.whl (131.4KiB)
nvtx-0.2.15-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (787.5KiB)
nvtx-0.2.15-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (789.2KiB)
nvtx-0.2.15-cp311-cp311-win_amd64.whl (131.5KiB)
nvtx-0.2.15-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (788.2KiB)
nvtx-0.2.15-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (787.3KiB)
nvtx-0.2.15-cp312-cp312-win_amd64.whl (126.2KiB)
nvtx-0.2.15-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (762.5KiB)
nvtx-0.2.15-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (764.2KiB)
nvtx-0.2.15-cp313-cp313-win_amd64.whl (125.7KiB)
nvtx-0.2.15-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (813.8KiB)
nvtx-0.2.15-cp313-cp313t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (770.2KiB)
nvtx-0.2.15-cp313-cp313t-win_amd64.whl (139.3KiB)
nvtx-0.2.15-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (763.4KiB)
nvtx-0.2.15-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (756.5KiB)
nvtx-0.2.15-cp314-cp314-win_amd64.whl (127.9KiB)
nvtx-0.2.15-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (814.9KiB)
nvtx-0.2.15-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (771.7KiB)
nvtx-0.2.15-cp314-cp314t-win_amd64.whl (145.6KiB)
nvtx-0.2.15-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (746.7KiB)
nvtx-0.2.15-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (750.6KiB)
nvtx-0.2.15-cp39-cp39-win_amd64.whl (132.0KiB)
nvtx-0.2.15.tar.gz (118.4KiB)