nvtx 0.2.13


pip install nvtx

  Latest version

Released: Aug 04, 2025


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

  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.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.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

Extras:
Dependencies: