This folder contains various sample scripts to illustrate the use of NVIDIA Nsight Compute's Python Report Interface.
The interface is provided as a python module in the Nsight Compute installation. It allows you to load the data from Nsight Compute's profile reports in python for analysis and post-processing in your own workflows.
For an introduction to the Python Report Interface, please have a look at our online documentation. You may also be interested in the full API documentation.
The collection of sample scripts currently contains the following Jupyter Notebooks:
Breakdown_metrics.ipynb
: Find and iterate over breakdown metricsKernel_name_based_filtering.ipynb
: FilterIAction
objects w.r.t. their name baseMetric_attributes.ipynb
: Query various properties ofIMetric
objectsNVTX_support.ipynb
: Filter kernels based on NVTX ranges and retrieve NVTX event attributesOpcode_instanced_metrics.ipynb
: Traverse opcode-instanced metrics along with their SASS instruction typesSource_correlated_metrics.ipynb
: Find and analyze metrics that are correlated with SASS/CUDA-C code
Below scripts cover more advanced content by extending the topics in the previous notebooks:
Aggregate_instruction_statistics.ipynb
: Combines and extendsOpcode_instanced_metrics
andSource_correlated_metrics
When executing the sample notebooks, make sure you can import the Python module ncu_report
.
It can usually be found in the extras/python
subfolder of an Nsight Compute installation.
You can either add its path to your PYTHONPATH
environment variable or use the site
library
to add the path at runtime:
import site
# Use this with the path containing the `ncu_report` module
site.addsitedir("/path/to/Nsight/Compute/extras/python")