From c74629acff13e5417cb505bc26e99d9fe5e5c453 Mon Sep 17 00:00:00 2001 From: hgt312 Date: Tue, 29 Jun 2021 12:19:27 +0800 Subject: [PATCH] address comments --- src/tir/analysis/deep_equal.cc | 2 +- tests/python/unittest/test_arith_rewrite_simplify.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tir/analysis/deep_equal.cc b/src/tir/analysis/deep_equal.cc index 87283451f910a..7f48cc4392340 100644 --- a/src/tir/analysis/deep_equal.cc +++ b/src/tir/analysis/deep_equal.cc @@ -60,7 +60,7 @@ bool ExprDeepEqual::operator()(const PrimExpr& lhs, const PrimExpr& rhs) const { return plhs->dtype == prhs->dtype && plhs->value == prhs->value; } if (lhs.as()) { - return lhs.same_as(rhs); + return false; } return DeepCmpSEqualHandler().SEqualReduce(lhs, rhs, false); } diff --git a/tests/python/unittest/test_arith_rewrite_simplify.py b/tests/python/unittest/test_arith_rewrite_simplify.py index 1ffd4ebdf26aa..3f0ea796ec3d7 100644 --- a/tests/python/unittest/test_arith_rewrite_simplify.py +++ b/tests/python/unittest/test_arith_rewrite_simplify.py @@ -275,7 +275,7 @@ def test_add_index_simplify(): def test_sub_index_simplify(): ck = RewriteChecker() x, y, z = te.var("x"), te.var("y"), te.var("z") - a, b, c = tvm.tir.Any(), tvm.tir.Any(), tvm.tir.Any() + a, b = tvm.tir.Any(), tvm.tir.Any(), tvm.tir.Any() ck.verify(x + y - y, x) ck.verify(x + y - x, y)