Skip to content

Commit

Permalink
Update backend test (#990)
Browse files Browse the repository at this point in the history
  • Loading branch information
lutzroeder committed Dec 16, 2022
1 parent 2414e06 commit 51ec793
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ def _test_torchscript():
# graph, _ = torch.jit._get_trace_graph(model, args) # pylint: disable=protected-access
# torch.onnx._optimize_trace(graph, torch.onnx.OperatorExportTypes.ONNX)
# trace = torch.load(os.path.join(test_data_dir, 'pytorch', 'fasterrcnn_resnet50_fpn.pt'))
# torch.backends.quantized.engine = 'qnnpack'
# trace = torch.load(os.path.join(test_data_dir, 'pytorch', 'd2go.pt'))
# trace = torch.load(os.path.join(test_data_dir, 'pytorch', 'mobilenetv2-quant_full-nnapi.pt'))
torch.backends.quantized.engine = 'qnnpack'
trace = torch.load(os.path.join(test_data_dir, 'pytorch', 'd2go.pt'))
# trace = torch.load(os.path.join(test_data_dir, 'pytorch', 'inception_v3_traced.pt'))
# trace = torch.load(os.path.join(test_data_dir, 'pytorch', 'netron_issue_920.pt'))
# trace = torch.load(os.path.join(test_data_dir, 'pytorch', 'bert-base-uncased.pt'))
torch._C._jit_pass_inline(trace.graph)
# https://github.com/pytorch/pytorch/blob/master/torch/csrc/jit/ir/ir.h
netron.serve('resnet34', trace)

# _test_onnx()
Expand Down

0 comments on commit 51ec793

Please sign in to comment.