wangzy0327 commented on issue #8696:
URL: https://github.com/apache/tvm/issues/8696#issuecomment-1502691723

   @areusch Hello , Do you know how to control the INFO level in tvm?
   
   If I want to print only higher output level instead of LOG INFO , what can I 
do to set the log level config?
   like the code as below.
   ```
     auto best_algo = perf_results[0].algo;
     LOG(INFO) << "\tCUDNN Found " << returned_algo_count << " fwd algorithms, 
choosing "
               << fwd_algo_names[best_algo];
     for (int i = 0; i < returned_algo_count; ++i) {
       LOG(INFO) << "\t\t" << i << ") " << fwd_algo_names[perf_results[i].algo]
                 << " - time: " << perf_results[i].time << " ms"
                 << ", Memory: " << perf_results[i].memory;
     }
   ```
   include/tvm/runtime/logging.h
   ```
   #define TVM_LOG_LEVEL_DEBUG 0
   #define TVM_LOG_LEVEL_INFO 1
   #define TVM_LOG_LEVEL_WARNING 2
   #define TVM_LOG_LEVEL_ERROR 3
   #define TVM_LOG_LEVEL_FATAL 4
   #define LOG(level) LOG_##level
   #define LOG_DEBUG \
     ::tvm::runtime::detail::LogMessage(__FILE__, __LINE__, 
TVM_LOG_LEVEL_DEBUG).stream()
   #define LOG_FATAL ::tvm::runtime::detail::LogFatal(__FILE__, 
__LINE__).stream()
   #define LOG_INFO ::tvm::runtime::detail::LogMessage(__FILE__, __LINE__, 
TVM_LOG_LEVEL_INFO).stream()
   #define LOG_ERROR \
     ::tvm::runtime::detail::LogMessage(__FILE__, __LINE__, 
TVM_LOG_LEVEL_ERROR).stream()
   #define LOG_WARNING \
     ::tvm::runtime::detail::LogMessage(__FILE__, __LINE__, 
TVM_LOG_LEVEL_WARNING).stream()
   ```


-- 
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]

Reply via email to