Hello.
I have a project and i want the run it with deference numbers of threads etc.
I have a script to make all the combinations for profiler.
I want to know if i could export the results of nvprof to text file.
If dont… any other idea for that?
And something else…
Could i get only average value of --metrics achieved_occupancy?
nvprof option --log-file <filename> can be used to redirect output to the specified file. Another option --csv can be used to generate the output in the comma-separated values format.
There is no switch in nvprof to generate just the average value of a metric, but see if --csv option makes it more convenient as you can do the filtering in the post processing step. $nvprof --csv --metrics achieved_occupancy <application>
Thank you.
I used:
nvprof --log-file --metrics achieved_occupancy
nvprof --csv --log-file --metrics achieved_occupancy
nvprof --csv --metrics achieved_occupancy `
First and second syntax create a txt file with only nvprof info.
That is ok, but i would like to have only min, max, avg values.
Specifically avg.
The second command have not csv format.
The file is same like the first.
Can you please provide few details about the system:
CUDA toolkit version
OS
GPU
I checked that --csv option works when I tried to profile the CUDA sample asyncAPI using CUDA 11.2 toolkit on a Windows machine. >nvprof --csv --log-file profiler_output.txt --metrics achieved_occupancy asyncAPI.exe
Thanks, I now see what issue you are pointing to. Except for the profiling meta data (lines with ==xxx==), rest of the profiling data is in the CSV format.
For this case, column names and the values are in the CSV format:
No, there is no option to remove the profiling meta data.
Option --log-file doesn’t support append operation. Pasting description from the help:
--log-file <filename>
Make nvprof send all its output to the specified file, or
one of the standard channels. The file will be overwritten.
If the file doesn't exist, a new one will be created.
"%1" as the whole file name indicates standard output
channel (stdout).
"%2" as the whole file name indicates standard error
channel (stderr). Note: This is the default.
"%p" in the file name string is replaced with the
process ID of the application being profiled.
"%q{<ENV>}" in the file name string is replaced
with the value of the environment variable "<ENV>". If the
environment variable is not set it's an error.
"%h" in the file name string is replaced with the
hostname of the system.
"%%" in the file name is replaced with "%".
Any other character following "%" is illegal.