Lunderberg opened a new pull request, #17023: URL: https://github.com/apache/tvm/pull/17023
Prior to this commit, variable replacement by `BindSymbolicVars` would fail to replace variables that occur within a `relax::MatchCast` node. This pattern is rare, because the `bind_symbolic_vars` method can only replace variables that are exposed as part of the function signature, and most uses of `relax::MatchCast` act as a definition for symbolic variables that are not exposed through the function signature. This pattern is well-formed, though, since the `relax::MatchCast` node can also act as a user of previously-defined symbolic variables. The root cause for this bug was in the `ExprMutator` visitor for `relax::MatchCast`, which did not visit the struct info field. As a result, the virtual `ExprMutator::VisitPrimExpr` function was not called for expressions that occur within the `StructInfo` of a `relax::MatchCast`. This commit updates `ExprMutator` to resolve this bug, and applies an analogous fix for `ExprVisitor`. -- 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]
