This is an automated email from the ASF dual-hosted git repository.

sanirudh pushed a commit to branch unity
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/unity by this push:
     new 26a20ee638 [Unity] Improved error message in relax::Normalizer (#16114)
26a20ee638 is described below

commit 26a20ee6388edd5029b1815ef6f5abe82731e9ca
Author: Eric Lunderberg <[email protected]>
AuthorDate: Tue Nov 14 08:18:36 2023 -0600

    [Unity] Improved error message in relax::Normalizer (#16114)
    
    Display the invalid struct info if a `Tuple` has anything other than
    `TupleStructInfo`.
---
 src/relax/ir/block_builder.cc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/relax/ir/block_builder.cc b/src/relax/ir/block_builder.cc
index f58ea20223..210af591b5 100644
--- a/src/relax/ir/block_builder.cc
+++ b/src/relax/ir/block_builder.cc
@@ -688,7 +688,8 @@ class Normalizer : public BlockBuilderImpl, private 
ExprFunctor<Expr(const Expr&
 
     if (!node->struct_info_.defined()) {
       auto opt = MatchStructInfo<TupleStructInfo>(node->tuple);
-      ICHECK(opt) << "The struct info of Tuple must be TupleStructInfo.";
+      ICHECK(opt) << "The struct info of Tuple must be TupleStructInfo, "
+                  << "but expression " << node << " has struct info " << 
node->struct_info_;
       UpdateStructInfo(node, opt.value()->fields[node->index]);
     }
 

Reply via email to