apache / tvm

Open deep learning compiler stack for cpu, gpu and specialized accelerators
https://tvm.apache.org/
Apache License 2.0
11.41k stars 3.4k forks source link

[UnitTests] Use tvm.ir.assert_structural_equal whenever possible #17092

Closed Lunderberg closed 3 weeks ago

Lunderberg commented 3 weeks ago

Prior to commit, many unit tests were implemented as assert tvm.ir.structural_equal(output, expected). While this is correct, it doesn't provide much information when the test fails. The tvm.ir.assert_structural_equal method performs the equivalent check, but displays the exact location where a mismatch occurs.

This commit replaces all use of assert tvm.ir.structural_equal with tvm.ir.assert_structural_equal.