This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
---------- onnx coverage: ---------- | |
Operators (passed/loaded/total): 21/21/70 | |
------------------------------------ | |
╒════════════════════╤════════════════════╕ | |
│ Operator │ Attributes │ | |
│ │ (name: #values) │ | |
╞════════════════════╪════════════════════╡ | |
│ Slice │ axes: 2 │ | |
│ │ ends: 3 │ | |
│ │ starts: 3 │ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from argparse import ArgumentParser | |
import os | |
from timeit import Timer | |
import numpy as np | |
from caffe2.python import workspace | |
import onnx | |
from onnx.numpy_helper import to_array | |
import onnx_caffe2.backend | |
import torch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jbai-mbp:/tmp/onnx-benchmark[1][2]$ python bench_caffe2.py --model_name resnet18 --batch_sizes 1 2 8 16 --runs 10 | |
WARNING:root:This caffe2 python run does not have GPU support. Will run in CPU only mode. | |
WARNING:root:Debug message: No module named caffe2_pybind11_state_gpu | |
Batch Size=1 | |
WARNING: Logging before InitGoogleLogging() is written to STDERR | |
I0925 20:12:10.023396 2958132160 net_simple.cc:81] Starting benchmark. | |
I0925 20:12:10.023424 2958132160 net_simple.cc:82] Running warmup runs. | |
I0925 20:12:10.221287 2958132160 net_simple.cc:92] Main runs. | |
I0925 20:12:11.880851 2958132160 net_simple.cc:103] Main run finished. Milliseconds per iter: 165.951. Iters per second: 6.02589 | |
I0925 20:12:13.568706 2958132160 net_simple.cc:152] Operator #0 (105, Conv) 11.2651 ms/iter |
NewerOlder