Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 1.12 KB

Benchmark_EN.md

File metadata and controls

28 lines (22 loc) · 1.12 KB

中文版本

How to benchmark

Mac or Linux

# in root directory of MNN
mkdir build
cd build
cmake .. && make -j4

then execute the commmand:

./benchmark.out models_folder [loop_count] [forwardtype]

forwardtype is in these options: 0->CPU,1->Metal,3->OpenCL,6->OpenGL,7->Vulkan. Here are benchmark models: models.

Android

You can directly execute the script bench_android.sh in the benchmark directory. It builds in armeabi-v7a architecture by default, and in arm64-v8a architecture if builds with parameter of arm64-v8a. BenchmarkModels will be pushed to your device if executed with parameter of -p.

benchmark.txt will be generated in benchmark directory after the execution.

iOS

  1. Prepare models with running the script get_model.sh in the tools/scropt;
  2. Open demo project in demo/iOS and run with Benchmark button at right-top edge, you can switch model, forward type and thread number for banchmark with bottom toolbar.

Test Result Of Benchmark

benchmark result