Lunderberg opened a new pull request, #16756:
URL: https://github.com/apache/tvm/pull/16756

   Prior to this commit, `tvm.ir.assert_structural_equal` would highlight an 
entire `relax::BindingBlock` if the number of elements in the binding block 
differs.  This can result in the entire Relax function being highlighted, 
making it difficult to identify the location of the mismatch.
   
   This commit makes the following changes, to improve the error messages that 
occur when `tvm.ir.assert_structural_equal` raises an exception.
   
   - In `"node.StructuralEqual"`, set `defer_fails = true` when `assert_mode` 
is true.  This highlights the first mismatch of an `Array<relax::Binding>`, 
rather than the entire array, in cases where the LHS and RHS have different 
sizes.
   
   - In the `SHashReduce` for `VarBinding` and `MatchCast`, visit the value 
first, and then the variable to which it is bound.  This highlights the 
mismatched expression, rather than mismatches in the resulting struct info.
   
   - In `SEqualHandlerDefault::Impl::SEqualReduce`, defer the failure if 
enabled.  This highlights the first mismatch, which may also have been 
deferred, rather than an early return a later mismatch occurs involving 
`NullOpt`.


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