Archermmt commented on code in PR #16128:
URL: https://github.com/apache/tvm/pull/16128#discussion_r1396406640


##########
src/relax/transform/fuse_ops.cc:
##########
@@ -1102,6 +1106,13 @@ class PatternBasedPartitioner : ExprVisitor {
       auto parent_group = GetGroupForBoundVar(binding->var);
       ICHECK(parent_group);
       parent_group->attrs.Set(attr::kComposite, pat_name_);
+      if (attrs_getter_ != nullptr) {
+        const auto& custom_attrs =
+            attrs_getter_(CreatePatternCheckContext(call, 
matches_opt.value()));

Review Comment:
   Emm..... that can be simplified. It can be changed to: call the 
CreatePatternCheckContext once and use in both check && attrs_getter. That 
depends on comment 1, if PatternCheckContext can be used as the context for 
attrs_getter, then I'll change this part.



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