You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by "cyx-6 (via GitHub)" <gi...@apache.org> on 2023/02/02 00:07:21 UTC

[GitHub] [tvm] cyx-6 commented on a diff in pull request #13859: [TVMScript] Connect `assert_structural_equal` with new TVMScript printer

cyx-6 commented on code in PR #13859:
URL: https://github.com/apache/tvm/pull/13859#discussion_r1093867699


##########
src/node/structural_equal.cc:
##########
@@ -313,10 +321,38 @@ class SEqualHandlerDefault::Impl {
       *first_mismatch_ = current_paths;
     }
     if (assert_mode_ && !result) {
-      LOG(FATAL) << "ValueError: StructuralEqual check failed, caused by lhs:" << std::endl
-                 << lhs << std::endl
-                 << "and rhs:" << std::endl
-                 << rhs;
+      std::ostringstream oss;
+      oss << "ValueError: StructuralEqual check failed, caused by lhs";

Review Comment:
   This is a great question. I have added the fallback mechanism to the `TVMScriptPrinter::Script` [here](https://github.com/apache/tvm/blob/0b8b8a2bab09a03258060560b487a8da5ca92f1c/src/node/script_printer.cc#L32-L34) in the latest commit. If we cannot dispatch the nodes to print (i.e. relay nodes, `Array`, `Map`, etc.), we fallback to the legacy printer.



-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org