2

I am trying to profile a TensorFlow based code using nvprof. I am using following command for this

nvprof  python ass2.py

The program runs successfully but at the end it shows following error.

==49791== Profiling application: python ass2.py
======== Error: Unable to import nvprof generated profile data.
Khayam Gondal
  • 2,366
  • 2
  • 28
  • 40
  • Could you try `nvprof --profile-child-processes python ass2.py`? The profile-child-processes option is needed because your target application - python - probably executes GPU stuff in a new spawned process. – ApoorvaJ Feb 09 '17 at 17:23

2 Answers2

8

use /usr/local/cuda/bin/nvprof xxx, maybe you have install two versions of cuda

OR you can add /usr/local/cuda/bin to PATH enviroment.

vim ~/.bashrc
export PATH=$PATH:/usr/local/cuda/bin
source ~/.bashrc
changqi.xia
  • 101
  • 4
0

I don't know the exact reason but using the full path of nvprof /usr/bin/nvprof solved the problem.

Khayam Gondal
  • 2,366
  • 2
  • 28
  • 40
  • 2
    perhaps because you have more than one `nvprof` on your system, from different versions of CUDA, and your `PATH` environment variable is picking up the wrong one. – Robert Crovella Feb 19 '17 at 05:00