I would like to display the completion time of a script, in terms of GPU time (not CPU).
For the CPU, I can simply use time
:
francky@gimmek80s:~$ time ls -l
total 8
drwxrwxr-x 3 francky francky 4096 Dec 16 22:19 codes
drwxrwxr-x 2 francky francky 4096 Jun 20 00:06 CUDA_practice
drwxrwxr-x 3 francky francky 4096 Dec 16 22:44 data
real 0m0.001s
user 0m0.000s
sys 0m0.000s
What is the equivalent for GPUs?
(I use the CUDA toolkit to perform some computations on my Nvidia GPUs.)
nvprof python $script_name
. Typically, timing in CUDA is done within the code itself. – nehcsivart Jan 17 '16 at 05:55