Skip to main content

Translate a NVIDIA Nsight System trace to a Paraver trace

Project description

nsys2prv: Translate NVIDIA Nsight Systems traces to Paraver traces

nsys2prv is a Python package that parses and interprets the exported data of an NVIDIA Nsight Systems^1 trace and converts it to Paraver semantics in order to browse the trace with Paraver. Paraver is a tool by the Performance Tools team at BSC, and is a parallel trace visualization system allowing for large scale trace execution analysis. Paraver can be obtained at https://tools.bsc.es/downloads.

The Nsight Systems traces should include GPU kernel activity, and also translate information about CUDA runtime, OpenACC constructs, MPI runtime, GPU metrics and NVTX regions. It supports reports of multiple processes and threads, but right now it still does not support merging multiple reports into one trace.

How it works

This tool relies on the export functionality of nsys. The data collection consists of a mix of the nsys stats predefined scripts, and a manual parsing of the .sqlite exported format data. The following figure summarizes the translation workflow: translation workflow

More details on the workflow and the data parsing logic can be read on the wiki pages.

Installation

nsys2prv is distributed as a PyPI package and thus can be installed with pip. The following requirements for the package to work will be installed automatically by pip:

  • python > 3.11
  • pandas > 2.2.2
  • sqlalchemy
  • tqdm

Additionally, it requires an installation of NIDIA Nsight Systems in your PATH to extract the data. Alternatively, you can set the NSYS_HOME environment variable. It is required that the version of Nsight Systems is always greater than the one used to obtain the trace. It is recommended at least the version 23.11.

To install the package just use pip globally or create a vitual environment:

pip install --global nsys2prv
# or
python -m venv ./venv
source ./venv/bin/activate
pip install nsys2prv

Basic usage

To translate a trace from Nsight Systems you need the .nsys-rep report file that nsys profile outputs. This serves as input to nsys2prv.

nsys2prv -t what,to,translate source.nsys-rep output-prv-name

Currently, the translator needs that the user manually specifies the different programming models information to translate using the --trace,-t flag. By default it always extracts kernel execution information, so it is mandatory that the nsys report contains GPU activity. Future releases will automatically detect the information that is available in the report and make this flag optional. The accepted value for the flag is a comma-separated list with any of the following categories:

  • cuda_api_trace: CUDA API calls
  • nvtx_pushpop_trace: The developer defined NVTX Push/Pop regions
  • nvtx_startend_trace: The developer defined NTXT Start/End regions
  • gpu_metrics: The sampling events of hardware metrics for the GPUs
  • mpi_event_trace: The MPI calls
  • openacc: The OpenACC constructs

Finally, the output-prv-name.prv trace can be opened with Paraver and analyzed.

Further documentation

For documentation about trace analysis and config files (CFGs) provided, please refer to the wiki pages.

Bug reporting and contribution

A list of the current bugs and features targeted can be seen in the GitLab repository. The project is still currently under initial development and is expecting a major code refactoring and changes in the command line interface (CLI). As it is a tool to support and enable performance analysts' work, new use cases or petitions for other programming model information support are always welcomed. Please contact marc.clasca@bsc.es or beppp@bsc.es for any of those requests, recommendations, or contribution ideas.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nsys2prv-0.4.0.dev20241118.tar.gz (727.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nsys2prv-0.4.0.dev20241118-py3-none-any.whl (47.7 kB view details)

Uploaded Python 3

File details

Details for the file nsys2prv-0.4.0.dev20241118.tar.gz.

File metadata

  • Download URL: nsys2prv-0.4.0.dev20241118.tar.gz
  • Upload date:
  • Size: 727.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.8.0-48-generic

File hashes

Hashes for nsys2prv-0.4.0.dev20241118.tar.gz
Algorithm Hash digest
SHA256 763208b5013896fc90c210e2fe73c2774f9fa164ec2ef0b4fe27528f63bb297f
MD5 6314c57defc900126af7a726434d563b
BLAKE2b-256 e6bc55bdb1b9ff68d786f3ba5fc6393dda779656f37f913b3216e45a8a6d6a3f

See more details on using hashes here.

File details

Details for the file nsys2prv-0.4.0.dev20241118-py3-none-any.whl.

File metadata

  • Download URL: nsys2prv-0.4.0.dev20241118-py3-none-any.whl
  • Upload date:
  • Size: 47.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.4 Linux/6.8.0-48-generic

File hashes

Hashes for nsys2prv-0.4.0.dev20241118-py3-none-any.whl
Algorithm Hash digest
SHA256 32099263668e7fd2adca5a31d7da543680ce33b031f6e5f6c036d57bb96ec919
MD5 4e50e8d3bf47ca051ab79a82138b4115
BLAKE2b-256 9addd3326e3999a292b0680535d8844c894f5bfeff8fd6f31cd6b0de1d383049

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page