jroesch commented on a change in pull request #7084:
URL: https://github.com/apache/tvm/pull/7084#discussion_r544728295
##########
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:
I agree with Tristan, I think we should consider bare `CHECK` statements
as a code-smell as any new users trying to understand why an invariant doesn't
hold have zero context, given the fact that some are invariants and some are
just lazy error handling we should better differentiate which is which and not
leave it up to the user.
----------------------------------------------------------------
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]