Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CUDA - Running NVVP on remote computer, showing results on local computer with no CUDA enabled device

At least some of us develop our CUDA code on remote servers. And they generally provide accesses only over SSH connections. It is possible to profile a CUDA application (or kernel) with such a command on the remote computer

nvprof -o profile.out -s ./prog args

Then the "profile.out" is downloaded to local computer.

My question is, is it possible to open this file using visual profiler on a computer with no CUDA enabled device? Is there any other tool that may open such files and provide similar or richer information than Visual Profiler.

I do get such an error "Unable to locate CUDA libraries and establish connection with CUDA driver. Make sure that the CUDA and CUDA runtime libraries are on your library path. See the installation guide for more information. The Visual Profiler will exit now".

Some references:

  • Compute Visual Profiler giving error when opening

  • Remote CUDA profiling?

like image 722
phoad Avatar asked Dec 27 '22 05:12

phoad


1 Answers

Using the version of nvvp shipped with CUDA 5.5, I was able to get nvvp running on a non-CUDA equiped machine to open a nvprof generated profile.

This was under Fedora 20. To get it to work I did the following:

  1. Download the RUN version of CUDA 5.5 from https://developer.nvidia.com/cuda-downloads
  2. Install the toolkit:

    sh cuda_5.5.22_linux_64.run -overide -toolkit -toolkitpath=$HOME/usr/cuda
    
  3. Extract the driver installer:

    sh cuda_5.5.22_linux_64.run -extract=/tmp
    
  4. Extract the driver files from the driver installer:

    cd /tmp
    sh ./NVIDIA-Linux-x86_64-319.37.run -a -x
    
  5. Link the driver libraries to names that nvvp will find:

    cd NVIDIA-Linux-x86_64-319.37
    for i in *.so.319.37; do ln -s $i ${i/.319.37/.1}; done
    
  6. Set LD_LIBRARY_PATH so nvvp will search the unpacked directory for the libraries:

    export LD_LIBRARY_PATH=/tmp/NVIDIA-Linux-x86_64-319.37
    
  7. Run nvvp and import the nvprof files.

NVVP will show the profile and it looks reasonable, but YMMV and I make no claims as to its correctness.

like image 162
Jonathan Barber Avatar answered Jan 13 '23 12:01

Jonathan Barber