mbs-octoml commented on a change in pull request #9012:
URL: https://github.com/apache/tvm/pull/9012#discussion_r711610329
##########
File path: src/runtime/logging.cc
##########
@@ -166,10 +167,115 @@ namespace tvm {
namespace runtime {
namespace detail {
+// Parse \p opt_spec as a VLOG specification as per comment in
+// DebugLoggingEnabled and VerboseLoggingEnabled.
+std::unordered_map<std::string, int> ParseTvmLogDebugSpec(const char*
opt_spec) {
+ std::unordered_map<std::string, int> map;
+ if (opt_spec == nullptr) {
+ // DLOG and VLOG disabled.
+ return map;
+ }
+ std::string spec(opt_spec);
+ if (spec.empty() || spec == "0") {
+ // DLOG and VLOG disabled.
+ return map;
+ }
Review comment:
avoiding undefined string over nullptr
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]