Lunderberg commented on code in PR #16067:
URL: https://github.com/apache/tvm/pull/16067#discussion_r1383694728
##########
src/relax/ir/block_builder.cc:
##########
@@ -600,6 +596,27 @@ class Normalizer : public BlockBuilderImpl, private
ExprFunctor<Expr(const Expr&
UpdateStructInfo(call, inferred_sinfo);
}
+ // In the spirit of joy and child-like whimsy, the conditional
+ // statement below is provided in both C++ and tongue-twister
+ // form. As very few C++ compilers are fluent in tongue-twister,
+ // only the C++ form is uncommented.
+ //
+ // How much opt could an opt op Op if an opt op could op opt?
+ if (auto opt_op = op->op.as<Op>()) {
+ auto op = opt_op.value();
+ if (apply_f_normalize_ && op_map_normalize_.count(op)) {
Review Comment:
Thank you, and updated! I had checked for a single-parameter `.get`, and an
iterator-style `.find`, but hadn't found the two-parameter `.get`.
Updated to use `if (auto func_normalize = op_map_normalize_.get(call->op,
nullptr); func_normalize != nullptr)`, here and in `well_formed.cc`.
--
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]