tkonolige commented on a change in pull request #7084:
URL: https://github.com/apache/tvm/pull/7084#discussion_r544722927
##########
File path: src/tir/transforms/make_packed_api.cc
##########
@@ -41,6 +41,56 @@
namespace tvm {
namespace tir {
+class ReturnRewriter : public StmtMutator {
+ public:
+ explicit ReturnRewriter(Var ret_var, Var ret_tcode) : ret_var_(ret_var),
ret_tcode_(ret_tcode) {}
+
+ Stmt VisitStmt_(const EvaluateNode* node) override {
+ Stmt ret = StmtMutator::VisitStmt_(node);
+ const EvaluateNode* eval = ret.as<EvaluateNode>();
+ CHECK(eval);
Review comment:
As someone who has hit many of these errors, an error message goes a
long way towards helping me debug these problems. Even if the error message is
as simple as "Internal invariant violated: an EvaluateNode was expected, but we
got a ___". The message "CHECK(eval)" tells me nothing.
I don't think the argument for binary size maxes much of a difference here.
We already include a string for the CHECK statement, this just makes it
marginally larger.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]