Skip to content

Commit

Permalink
Fix test case
Browse files Browse the repository at this point in the history
  • Loading branch information
quic-sanirudh committed Aug 22, 2023
1 parent 28d0cc2 commit 685cc76
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions tests/python/relax/test_relay_translator.py
Original file line number Diff line number Diff line change
Expand Up @@ -330,10 +330,12 @@ def run_after_pass(self, mod, info):
self.events.append("run after " + info.name)

my_test = SampleRunBeforeAfterInstrument()
with tvm.transform.PassContext(instruments=[my_test]):
mod = relay.transform.InferType()(mod)
relax_mod_with_attrs = relay_translator.from_relay(
mod["main"], target="llvm", instruments=[my_test]
)

assert "run before InferType" "run after InferType" == "".join(my_test.events)
assert "run after " in "".join(my_test.events)
assert "run before " in "".join(my_test.events)


if __name__ == "__main__":
Expand Down

0 comments on commit 685cc76

Please sign in to comment.