Nsight Python is a Python kernel profiling interface based on NVIDIA Nsight Tools. It helps you unlock peak performance from your GPU kernels by simplifying performance benchmarking and visualization of performance metrics — all in just a few lines of Python.
Please refer to the Installation documentation for detailed instructions.
Install as an editable install:
pip install -e .If you want to manage all run-time dependencies yourself, also pass the --no-deps flag.
Tests require NVIDIA Nsight Compute to be installed and available in your PATH.
Install pytest and the pytest-isolated plugin (some tests run in a fresh process):
pip install pytest pytest-isolated
Most tests and examples require PyTorch for GPU operations:
# Install PyTorch with CUDA support matching your system (e.g., CUDA 12.6, 12.9, 13.0) # Replace cuXXX with your CUDA version (e.g., cu126, cu129, cu130) pip install torch --index-url https://download.pytorch.org/whl/cuXXX
Visit pytorch.org for installation commands matching your specific CUDA version.
pytest tests -v # Run just unit tests pytest examples -v # Run just the examples pytest -v # Run the tests and examples
Review the CONTRIBUTING.md file for information on how to contribute code and issues to the project.
All files hosted in this repository are subject to the Apache 2.0 license.