Skip to content

Instantly share code, notes, and snippets.

@NHZlX
Forked from sonots/nvvp.md
Created September 19, 2019 04:43
Show Gist options
  • Save NHZlX/f35e8e5171dcc8744fd9417d0eefe752 to your computer and use it in GitHub Desktop.
Save NHZlX/f35e8e5171dcc8744fd9417d0eefe752 to your computer and use it in GitHub Desktop.
How to use NVIDIA profiler

Usually, located at /usr/local/cuda/bin

Non-Visual Profiler

$ nvprof python train_mnist.py

I prefer to use --print-gpu-trace.

$ nvprof --print-gpu-trace python train_mnist.py

Visual Profiler

On GPU machine, run

$ nvprof -o prof.nvvp python train_mnist.py

Copy prof.nvvp into your local machine

$ scp your_gpu_machine:/path/to/prof.nvvp .

Then, run nvvp (nvidia visual profiler) on your local machine:

$ nvvp prof.nvvp

It works more comfortably than X11 forwarding or something.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment