nvtx 0.2.17


pip install nvtx

  Latest version

Released: Nov 04, 2026


Meta
Author: NVIDIA Corporation
Requires Python: >=3.9

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

  1. 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()
    
  2. Use NVIDIA Nsight Systems to collect profile data:

    nsys profile -t nvtx python demo.py
    
  3. Visualize the results using the Nsight systems GUI:

    demo

Documentation

See here for detailed docs.

Release Notes

0.2.17

  • Discover an NVTX injection from the CUDA driver when environment variable NVTX_INJECTION64_PATH / NVTX_INJECTION32_PATH is not set (C langauge changes only).

0.2.16

  • Add support for counter annotations through the NVTX Counters extension.
  • Add nvtx.writer for writing pre-collected events and counter samples (NVTXW).
  • Drop support for Python 3.8.
  • Fix several payload-handling edge cases.

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_DISABLE environment variable to Profile class.

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 domain object for better performance.
  • No-OP when domain is disabled.
  • Improved documentation.

Wheel compatibility matrix

Platform CPython 3.9 CPython 3.10 CPython 3.11 CPython 3.12 CPython 3.13 CPython 3.14 CPython (additional flags: t) 3.14
manylinux2014_aarch64
manylinux2014_x86_64
manylinux_2_17_aarch64
manylinux_2_17_x86_64
manylinux_2_28_aarch64
manylinux_2_28_x86_64
win_amd64
win_arm64

Files in release

nvtx-0.2.17-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (2.8MiB)
nvtx-0.2.17-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.8MiB)
nvtx-0.2.17-cp310-cp310-win_amd64.whl (420.7KiB)
nvtx-0.2.17-cp310-cp310-win_arm64.whl (389.6KiB)
nvtx-0.2.17-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (2.9MiB)
nvtx-0.2.17-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (3.0MiB)
nvtx-0.2.17-cp311-cp311-win_amd64.whl (422.2KiB)
nvtx-0.2.17-cp311-cp311-win_arm64.whl (387.7KiB)
nvtx-0.2.17-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (2.9MiB)
nvtx-0.2.17-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.9MiB)
nvtx-0.2.17-cp312-cp312-win_amd64.whl (407.1KiB)
nvtx-0.2.17-cp312-cp312-win_arm64.whl (373.2KiB)
nvtx-0.2.17-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (2.8MiB)
nvtx-0.2.17-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.9MiB)
nvtx-0.2.17-cp313-cp313-win_amd64.whl (404.8KiB)
nvtx-0.2.17-cp313-cp313-win_arm64.whl (371.8KiB)
nvtx-0.2.17-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (2.8MiB)
nvtx-0.2.17-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.8MiB)
nvtx-0.2.17-cp314-cp314-win_amd64.whl (413.6KiB)
nvtx-0.2.17-cp314-cp314-win_arm64.whl (382.6KiB)
nvtx-0.2.17-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (2.9MiB)
nvtx-0.2.17-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.8MiB)
nvtx-0.2.17-cp314-cp314t-win_amd64.whl (446.2KiB)
nvtx-0.2.17-cp314-cp314t-win_arm64.whl (409.4KiB)
nvtx-0.2.17-cp39-cp39-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl (2.8MiB)
nvtx-0.2.17-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (2.8MiB)
nvtx-0.2.17-cp39-cp39-win_amd64.whl (422.1KiB)
nvtx-0.2.17-cp39-cp39-win_arm64.whl (390.6KiB)
nvtx-0.2.17.tar.gz (191.3KiB)
Extras:
Dependencies: