masahi commented on code in PR #12761:
URL: https://github.com/apache/tvm/pull/12761#discussion_r997846843


##########
python/tvm/tir/analysis/analysis.py:
##########
@@ -331,3 +331,32 @@ def OOBChecker():
         The result pass
     """
     return _ffi_api.OOBChecker()  # type: ignore
+
+
+def communicative_deep_equal(lhs: PrimExpr, rhs: PrimExpr) -> bool:
+    """Deeply compare two nested expressions that have communicative equality.
+
+    Parameters
+    ----------
+    lhs : PrimExpr
+        The left operand.
+
+    rhs : PrimExpr
+        The right operand.
+
+    Returns
+    -------
+    result : bool
+        The comparison result
+
+    Note
+    ----
+
+    This function is an extension of py:func:`tvm.ir.expr_deep_equal`, it can
+    handle commutativity. The function will not return true for (x + y) vs (y 
+ x).

Review Comment:
   By "The function", which function you are talking about here? If you start 
by saying "This function" and continue with "The function" in the next 
sentence, people would think that they refer to the same function.



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