Logging is disabled in the ZenDNN library by default. It can be enabled using the
environment variable ZENDNN_LOG_OPTS before running any test.
Logging behavior can be specified by setting the environment variable
ZENDNN_LOG_OPTS to a comma-delimited list of
ACTOR:DBGLVL pairs.
The different ACTORS are as follows.
| Actor | Description |
|---|---|
| ALGO | Logs all the executed algorithms. |
| CORE | Logs all the core ZenDNN library operations. |
| API | Logs all the ZenDNN API calls. |
| TEST | Logs all the calls used in API, functionality, and regression tests. |
| PROF | Logs metadata for the op. |
| FWK | Logs all the framework (TensorFlow and PyTorch) specific calls. |
Example
- To turn on info logging, use
ZENDNN_LOG_OPTS=ALL:2 - To turn off all logging, use
ZENDNN_LOG_OPTS=ALL:-1 - To only log errors, use
ZENDNN_LOG_OPTS=ALL:0 - To only log info for ALGO, use
ZENDNN_LOG_OPTS=ALL:-1,ALGO:2 - To only log info for CORE, use
ZENDNN_LOG_OPTS=ALL:-1,CORE:2 - To only log info for FWK, use
ZENDNN_LOG_OPTS=ALL:-1,FWK:2 - To only log info for API, use
ZENDNN_LOG_OPTS=ALL:-1,API:2 - To only log info for PROF (profile), use
ZENDNN_LOG_OPTS=ALL:-1,PROF:2
Enable Log Profiling
To enable the log profiling of zendnn_primitive_create and zendnn_primitive_execute, set ZENDNN_PRIMITIVE_LOG_ENABLE=1
To log performance of operations, use ZENDNN_LOG_OPTS=ALL:-1,PROF:3
along with ZENDNN_PRIMITIVE_LOG_ENABLE=1.
The Different Debug Levels (DBGLVL) are as follows.
| Debug Level | Value |
|---|---|
LOG_LEVEL_DISABLED
|
-1 |
LOG_LEVEL_ERROR
|
0 |
LOG_LEVEL_WARNING
|
1 |
LOG_LEVEL_INFO
|
2 |
LOG_LEVEL_VERBOSE0
|
3 |
LOG_LEVEL_VERBOSE1
|
4 |
LOG_LEVEL_VERBOSE2
|
5 |
CORE, API, and PROF are mandatory logs when ZenDNN library is invoked. ALGO, TEST, and FWK are optional logs and might not appear in all the cases.