Skip to content

Commit

Permalink
swap pytorch and tvm import order (#7380)
Browse files Browse the repository at this point in the history
  • Loading branch information
masahi authored Jan 31, 2021
1 parent 3734d5f commit e892619
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/python/frontend/pytorch/test_object_detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -33,6 +31,8 @@
)
from tvm.contrib.download import download

import torch
import torchvision

in_size = 300

Expand Down Expand Up @@ -150,10 +150,10 @@ def compile_and_run_vm(mod, params, data_np, target):
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")

Expand Down

0 comments on commit e892619

Please sign in to comment.