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


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

Review Comment:
   Thanks for the review!It was a typo, I have corrected it.



##########
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:
   Thanks for the review!The description here is indeed misleading, I have 
replaced "The function" with the exact function name to avoid misunderstanding.



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