Activity Logging#
Four different environment variables can be set to enable logging in rocSPARSE: ROCSPARSE_LAYER, ROCSPARSE_LOG_TRACE_PATH, ROCSPARSE_LOG_BENCH_PATH and ROCSPARSE_LOG_DEBUG_PATH.
ROCSPARSE_LAYER is a bit mask that enables logging, and where several logging modes (rocsparse_layer_mode) can be specified as follows:
|
logging is disabled. |
|
trace logging is enabled. |
|
bench logging is enabled. |
|
trace logging and bench logging are enabled. |
|
debug logging is enabled. |
|
trace logging and debug logging are enabled. |
|
bench logging and debug logging are enabled. |
|
trace logging and bench logging and debug logging are enabled. |
When logging is enabled, each rocSPARSE function call will write the function name and function arguments to the logging stream. The default logging output is streamed to stderr.
Note
Performance will degrade when logging is enabled. By default, the environment variable ROCSPARSE_LAYER is unset and logging is disabled.
To capture activity logging in a file set the following environment variables as needed:
ROCSPARSE_LOG_TRACE_PATHspecifies a path and file name to capture trace logging streamed to that file
ROCSPARSE_LOG_BENCH_PATHspecifies a path and file name to capture bench logging
ROCSPARSE_LOG_DEBUG_PATHspecifies a path and file name to capture debug logging
Note
If the file cannot be opened, logging output is streamed to stderr.