oneDNN
oneDNN copied to clipboard
rfcs: proposal for a verbose logging mechanism
I think a few things are to be clarified here:
- spdlog exposes its own environment variables: how would those interact with ONEDNN_VERBOSE setting? For example if a user does not set ONEDNN_VERBOSE, but sets SPDLOG_LEVEL=TRACE, would oneDNN print ? Or if a user sets both, do they combine/override each other?
- if we expose new environment variables, matching APIs will need to be exposed to programatically control that
- in few of the links you provide, spdlog v1 is used, but it seems there are newer releases. Is the recommendation to go with v1 or a specific version?
- Which kind of logger would we use in oneDNN? IIUC, spdlog provides multiple loggers with different properties? In particular, flushing at every message can be necessary for debugging purpose, is there control for that?
- The expectation is to not use any of the SPDLOG environmental variables to control logging in oneDNN. With a header-based approach, one can build spdlog without the support for logging using argv /environment var. That way, logging is only controlled programmatically and by using the ONEDNN_VERBOSE settings.
- The latest stable release for spdlog is v1.13 and that is the recommended version to use for logging support. While there is a master branch for spdlog, it is old and deprecated - v1.x is the actual master branch to be used. (See https://github.com/gabime/spdlog/issues/1346).
- The proposal is to use a rotating logger for oneDNN as defined here for spdlog. The rotating logger type is useful for keeping the maximum file size in check as the data is logged from several sources.
The document has been updated to reflected suggested changes as well as additions to the proposed design.