Skip to content

Commit

Permalink
alter tests
Browse files Browse the repository at this point in the history
  • Loading branch information
anwang2009 committed Apr 6, 2022
1 parent 22131e1 commit ec940d4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions tests/python/relay/test_pass_legalize_tensorcore.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ def expected():
a = before()
a = run_opt_pass(a, transform.Legalize())
b = run_opt_pass(expected(), transform.InferType())

assert tvm.ir.structural_equal(a, b), "Actual = \n" + str(a) + "Expected = \n" + str(b)

# dense
Expand All @@ -258,8 +259,8 @@ def expected():
_test_legalize_dense((8, 15), (32, 15), (0, 1, 0), dtype)
_test_legalize_dense((8, 16), (31, 16), (0, 0, 1), dtype)
_test_legalize_dense((7, 15), (31, 15), (1, 1, 1), dtype)
_test_legalize_dense((3, 16), (32, 16), (5, 0, 0), dtype)
_test_legalize_dense((2, 16), (32, 16), (0, 0, 0), dtype, False)
_test_legalize_dense((3, 16), (32, 16), (1, 0, 0), dtype)
_test_legalize_dense((1, 16), (32, 16), (0, 0, 0), dtype, False)

# Test if units parameter is correctly updated
_test_legalize_dense((8, 16), (30, 16), (0, 0, 2), "float16", units=30)
Expand Down

0 comments on commit ec940d4

Please sign in to comment.