tlc-pack / TLCBench

Benchmark scripts for TVM
73 stars 28 forks source link

Roadmap for a Reproducible TVM Benchmark #1

Open merrymercy opened 3 years ago

merrymercy commented 3 years ago

Motivation

Currently, TVM lacks an up-to-date and reproducible benchmark. The only benchmark is hosted at tvm/apps/benchmark. However, this benchmark is too old and has several flaws.

  1. The results were obtained 2 years ago.
  2. The deep learning models are old. It does not include new models (e.g., BERT, EfficientNet)
  3. The input format is TVM's internal relay format. It does not use formats from high-level frameworks (e.g., pytorch, mxnet) or open exchange format (e.g., ONNX).
  4. It does not cover Intel CPUs.
  5. It only provides pre-tuned configurations by tophub, but does not provide the scripts to generate these configurations.

This repo aims at building a new open, reproducible bechmark for TVM. When the repo is ready, we can run evaluation nightly and run auto-tuning weekly or monthly.

Approach

As the first step, we target three models, three hardware platforms and four code generation strategies. To make the comparision with other frameworks easier, we choose ONNX as the input model format.

All logs generated during the auto-tuning should be uploaded for future references.

Roadmap

Task 1: Add autotvm benchmark

reference: the old autotvm benchmark

Task 2: Add auto-scheduler benchmark

Task 3: Add ONNX-runtime benchmark

reference: https://github.com/microsoft/onnxruntime

Task 4: Add tvm + manual library benchmark

reference: https://tvm.apache.org/docs/tutorials/frontend/using_external_lib.html

merrymercy commented 3 years ago

cc @tlc-pack/tlcpack-committer

hanzz2007 commented 3 years ago

shufflenet is also a popular model in production usage, any plan to support it ?

merrymercy commented 3 years ago

@hanzz2007 It is not on my agenda, but contributions are welcome. I updated the scripts and some results to main branch. You can easily plug in your own model.