Skip to content

Welcome to our weekly research support coffee hour on Zoom! Click here for more information.

nsys: Nvidia GPU and CPU profiler

Available

  • Roihu-GPU: version depends on the CUDA environment

License

Usage is possible for both academic and commercial purposes.

Usage

NVIDIA Nsight Systems is a performance analysis tool for tracing GPU and CPU workloads. It enables the collection of a timeline of CUDA-related activities, including kernel execution, memory transfers, memory set and CUDA API calls and events or metrics for CUDA kernels. The tool is very useful in identifying the high-level bottlenecks, hotspots and for determining which kernels should be targeted for optimization and analysis with the Nsight Compute tool.

Profiling is done in two steps:

  1. Collect profiling data by running the application under nsys command line tool
  2. Analyze the results with nsys-ui GUI.

To use nsys, one needs to first load the CUDA module:

module load cuda

For collecting data, run your application normally via Slurm and prepend your executable with nsys <profiling options>:

#SBATCH ...
...

srun nsys profile -t nvtx,cuda ./my_executable

nsys supports many useful options. For more details please check the NVIDIA documentation.

By default, results are stored in a file named report<N>.nsys-rep, which can then be analyzed with the nsys-ui GUI:

nsys-ui report1.nsys-rep`

The nsys-ui can be run directly on the CSC supercomputers, however, for smoother operation of the GUI it is recommended to copy the results files to your local workstation and view them using a local installation of Nsight Systems.

Do you find this page useful?
Thank you for your feedback!
Thank you! Your feedback is appreciated.

Please let us know how we could improve this page by contacting us or by creating an issue in GitHub. You can also edit this page yourself and contribute your improvements by creating a pull request.