Calling computeprof from a script launching profiler without GUI

Is there a way to launch CUDA3.2 computeprof without GUI? I’d like to pass the project name and profiler flags as parameters, and get the profiling results in a csv file.

Any ideas how to do this? Btw, I already tried “export CUDA_PROFILE=1”, but the log file is not in csv format and contains just execution times…

Is there a way to launch CUDA3.2 computeprof without GUI? I’d like to pass the project name and profiler flags as parameters, and get the profiling results in a csv file.

Any ideas how to do this? Btw, I already tried “export CUDA_PROFILE=1”, but the log file is not in csv format and contains just execution times…

You can set the format and the signals you want to monitor.

The Cuda profiler is controlled using the following environment
variables:

CUDA_PROFILE

is set to either 1 or 0 (or unset) to enable or disable profiling.

CUDA_PROFILE_LOG

is set to the desired file path for profiling output. If there is no
log path specified, the profiler will log data to ./cuda_profile.log.
In case of multiple devices you can add ‘%d’ in the CUDA_PROFILE_LOG
name. This will generate separate profiler output files for each device

  • with ‘%d’ substituted by the device number.

CUDA_PROFILE_CSV

is set to either 1 or 0 (or unset) to enable or disable a comma
separated version of the log output.

CUDA_PROFILE_CONFIG

is used to specify a config file for enabling performance counters
in the GPU. See the next section for configuration details.

You can set the format and the signals you want to monitor.

The Cuda profiler is controlled using the following environment
variables:

CUDA_PROFILE

is set to either 1 or 0 (or unset) to enable or disable profiling.

CUDA_PROFILE_LOG

is set to the desired file path for profiling output. If there is no
log path specified, the profiler will log data to ./cuda_profile.log.
In case of multiple devices you can add ‘%d’ in the CUDA_PROFILE_LOG
name. This will generate separate profiler output files for each device

  • with ‘%d’ substituted by the device number.

CUDA_PROFILE_CSV

is set to either 1 or 0 (or unset) to enable or disable a comma
separated version of the log output.

CUDA_PROFILE_CONFIG

is used to specify a config file for enabling performance counters
in the GPU. See the next section for configuration details.

Thank you very much, CSV comes out fine now!

Can you please give some example on how to list the performance counters in the config file for CUDA_PROFILE_CONFIG?

Thank you very much, CSV comes out fine now!

Can you please give some example on how to list the performance counters in the config file for CUDA_PROFILE_CONFIG?

#cat cuda_prof_conf
timestamp
gpustarttimestamp
gpuendtimestamp
streamid

export CUDA_PROFILE_CONF=./cuda_prof_conf

#cat cuda_prof_conf
timestamp
gpustarttimestamp
gpuendtimestamp
streamid

export CUDA_PROFILE_CONF=./cuda_prof_conf

Thank you! I tried using flag names from a CVS file generated by the CUDA visual profiler (3.2), however just a few of them are recognized (there’s a bunch warnings).
Is there maybe a list of valid flags?

Thank you! I tried using flag names from a CVS file generated by the CUDA visual profiler (3.2), however just a few of them are recognized (there’s a bunch warnings).
Is there maybe a list of valid flags?

hey, anybody knows where to find the list of signal names? The obvious suspects (copied from Visual Profiler log file) do not get processed, and I couldn’t find the list in the docs… please point me to the right resource!

hey, anybody knows where to find the list of signal names? The obvious suspects (copied from Visual Profiler log file) do not get processed, and I couldn’t find the list in the docs… please point me to the right resource!

Look for Compute_Profiler.txt in your CUDA toolkit. On my system it is at /usr/local/cuda/doc/Compute_Profiler.txt

Look for Compute_Profiler.txt in your CUDA toolkit. On my system it is at /usr/local/cuda/doc/Compute_Profiler.txt

Thanks!