Lunderberg opened a new pull request, #14498:
URL: https://github.com/apache/tvm/pull/14498

   This commit adds a templated overload to `SEqualReducer::operator()` that 
accepts a lambda function to update the path of the LHS and RHS of the 
comparison.
   
   ```c++
   // Usage prior to this utility function
   if (equal.IsPathTracingEnabled()) {
     const ObjectPathPair& self_paths = equal.GetCurrentObjectPaths();
     ObjectPathPair attr_paths = {self_paths->lhs_path->Attr("value"),
                                  self_paths->rhs_path->Attr("value")};
     if (!equal(this->value, other->value, attr_paths)) return false;
   } else {
     if (!equal(this->value, other->value)) return false;
   }
   
   // Usage after this utility function
   if (!equal(this->value, other->value,
              [](const auto& path) { return path->Attr("value"); })) {
     return false;
   }
   ```


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