Skip to content

Commit

Permalink
removed TODO in rewrite check
Browse files Browse the repository at this point in the history
  • Loading branch information
masahi committed Dec 23, 2020
1 parent 8029644 commit bc5e3ec
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/python/frontend/pytorch/test_object_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@

from tvm import relay
from tvm.runtime.vm import VirtualMachine
from tvm.relay.dataflow_pattern import rewrite
from tvm.relay.frontend.pytorch_utils import NMSRewrite
from tvm.relay.frontend.pytorch_utils import rewrite_nms_to_batched_nms
from tvm.contrib.download import download


Expand Down Expand Up @@ -142,8 +141,7 @@ def count_valid_scores(scores):
)

before = mod["main"]
after = rewrite(NMSRewrite(), before)
# TODO(masahi): Is there a better way to test if the desired rewrite has happened?
after = rewrite_nms_to_batched_nms(before)
assert not tvm.ir.structural_equal(after, before)

mod["main"] = after
Expand Down

0 comments on commit bc5e3ec

Please sign in to comment.