-
Notifications
You must be signed in to change notification settings - Fork 85
Logging
Four environment variables can be set to control logging:
ROCFFT_LAYER
ROCFFT_LOG_TRACE_PATH
ROCFFT_LOG_BENCH_PATH
ROCFFT_LOG_PROFILE_PATH
ROCFFT_LAYER
is a bitwise OR of zero or more bit masks as follows:
- If
ROCFFT_LAYER
is not set, then there is no logging - If
(ROCFFT_LAYER & 1) != 0
, then there is trace logging - If
(ROCFFT_LAYER & 2) != 0
, then there is bench logging - If
(ROCFFT_LAYER & 4) != 0
, then there is profile logging
Trace logging outputs a line each time a rocFFT function is called. The line contains the function name and useful details about the arguments that can be used for troubleshooting.
Bench logging outputs a line each time a rocFFT function is called. The line can be used with the executable rocfft-rider
to reproduce the same transform.
Profile logging emits performance information for each executed kernel. This includes information such as the transform strategy, kernel duration, transform size, and memory bandwidth utilization. This information is only emitted when the kernels are executed on the null stream, as that is the only time rocFFT is able to wait for completion of each kernel.
The default stream for logging output is standard error. Three environment variables can set the full path name for a log file:
-
ROCFFT_LOG_TRACE_PATH
sets the full path name for trace logging -
ROCFFT_LOG_BENCH_PATH
sets the full path name for bench logging -
ROCFFT_LOG_PROFILE_PATH
sets the full path name for profile logging
If a path name is unspecified or cannot be opened, then the corresponding logging output is streamed to standard error.
Note that performance will degrade when logging is enabled.
When profile logging is enabled, memory usage will increase. If the program exits abnormally, then it is possible that profile logging will not be outputted before the program exits.