janetsc commented on code in PR #13072:
URL: https://github.com/apache/tvm/pull/13072#discussion_r1001852431


##########
include/tvm/runtime/logging.h:
##########
@@ -378,17 +381,19 @@ class LogFatal {
  */
 class LogMessage {
  public:
-  LogMessage(const std::string& file, int lineno) {
+  LogMessage(const std::string& file, int lineno, int level) {
     std::time_t t = std::time(nullptr);
     stream_ << "[" << std::put_time(std::localtime(&t), "%H:%M:%S") << "] " << 
file << ":" << lineno
-            << ": ";
+            << ": " << level_strings_[level];

Review Comment:
   Does this need to end with ": " still?



##########
src/runtime/hexagon/hexagon_common.cc:
##########
@@ -69,22 +70,22 @@ std::vector<std::string> SplitString(const std::string& 
str, char delim) {
   }
   return lines;
 }
-void HexagonLog(const std::string& file, int lineno, const std::string& 
message) {
-  HEXAGON_PRINT(ALWAYS, "INFO: %s:%d:", file.c_str(), lineno);
+void HexagonLog(const std::string& file, int lineno, int level, const 
std::string& message) {
   std::vector<std::string> err_lines = SplitString(message, '\n');
   for (auto& line : err_lines) {
-    HEXAGON_PRINT(ALWAYS, "INFO: %s", line.c_str());
+    // TVM log levels roughly map to HAP log levels
+    HAP_debug_runtime(level, file.c_str(), lineno, line.c_str());

Review Comment:
   Where does HAP_debug_runtime output go?



##########
src/runtime/hexagon/rpc/android_bash.sh.template:
##########
@@ -20,7 +20,7 @@ export LD_LIBRARY_PATH=.
 
 # Enable FARF-based logging for Hexagon code invoked by 
'tvm_rpc_android_server'.
 export ADSP_LIBRARY_PATH=`pwd`
-echo 0x1f > tvm_rpc_android.farf
+echo 0x1e > tvm_rpc_android.farf

Review Comment:
   Can you add a comment?



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