| 366 | |
| 367 | #if TARGET_OS_IPHONE |
| 368 | void iosBenchAll(const char* modelPath) { |
| 369 | std::cout << "MNN benchmark" << std::endl; |
| 370 | int loop = 20; |
| 371 | int warmup = 10; |
| 372 | MNNForwardType forward = MNN_FORWARD_CPU; |
| 373 | forward = MNN_FORWARD_NN; |
| 374 | int numberThread = 4; |
| 375 | int precision = 2; |
| 376 | std::cout << "Forward type: **" << forwardType(forward) << "** thread=" << numberThread << "** precision=" <<precision << std::endl; |
| 377 | std::vector<Model> models = findModelFiles(modelPath); |
| 378 | std::cout << "--------> Benchmarking... loop = " << loop << ", warmup = " << warmup << std::endl; |
| 379 | |
| 380 | for (auto& m : models) { |
| 381 | std::vector<float> costs = doBench(m, loop, warmup, forward, false, numberThread, precision); |
| 382 | displayStats(m.name, costs); |
| 383 | } |
| 384 | } |
| 385 | #else |
| 386 | int main(int argc, const char* argv[]) { |
| 387 | std::cout << "MNN benchmark" << std::endl; |
nothing calls this directly
no test coverage detected