This is an automated email from the ASF dual-hosted git repository.

tqchen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tvm.git


The following commit(s) were added to refs/heads/main by this push:
     new e892619  swap pytorch and tvm import order (#7380)
e892619 is described below

commit e8926199b8c25ad11eb8641c4aef8efec13b9380
Author: masahi <[email protected]>
AuthorDate: Mon Feb 1 00:42:29 2021 +0900

    swap pytorch and tvm import order (#7380)
---
 tests/python/frontend/pytorch/test_object_detection.py | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tests/python/frontend/pytorch/test_object_detection.py 
b/tests/python/frontend/pytorch/test_object_detection.py
index 6b7f9be..3c94b0b 100644
--- a/tests/python/frontend/pytorch/test_object_detection.py
+++ b/tests/python/frontend/pytorch/test_object_detection.py
@@ -17,8 +17,6 @@
 # pylint: disable=import-self, invalid-name, unused-argument
 """Test torch vision fasterrcnn and maskrcnn models"""
 import numpy as np
-import torch
-import torchvision
 import cv2
 
 import tvm
@@ -33,6 +31,8 @@ from tvm.relay.frontend.pytorch_utils import (
 )
 from tvm.contrib.download import download
 
+import torch
+import torchvision
 
 in_size = 300
 
@@ -150,10 +150,10 @@ def test_detection_models():
     after = mod["main"]
     assert not tvm.ir.structural_equal(after, before)
 
-    # before = mod["main"]
-    # mod = rewrite_scatter_to_gather(mod, 4)  # num_scales is 4 for 
maskrcnn_resnet50_fpn
-    # after = mod["main"]
-    # assert not tvm.ir.structural_equal(after, before)
+    before = mod["main"]
+    mod = rewrite_scatter_to_gather(mod, 4)  # num_scales is 4 for 
maskrcnn_resnet50_fpn
+    after = mod["main"]
+    assert not tvm.ir.structural_equal(after, before)
 
     tvm_res_after_rewrite = compile_and_run_vm(mod, params, data_np, "llvm")
 

Reply via email to