Skip to content

Commit

Permalink
[benchmark] optimize benchmark bin usage (PaddlePaddle#1868)
Browse files Browse the repository at this point in the history
* [benchmark] add disable_mkldnn option for paddle infer backend to support 3D model

* [benchmark] optimize benchmark bin usage

* [benchmark] optimize benchmark bin usage
  • Loading branch information
DefTruth authored Apr 25, 2023
1 parent 37794d5 commit 430fc42
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 8 additions & 1 deletion benchmark/cpp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,15 @@ FastDeploy除了提供包含模型前后处理在内的benchmark_xxx外,也提
| model_file | Optional, set specific model file, eg, model.pdmodel, model.onnx, default "UNKNOWN" |
| params_file | Optional, set specific params file, eg, model.pdiparams, default "" |
| model_format | Optional, set specific model format, eg, PADDLE/ONNX/RKNN/TORCHSCRIPT/SOPHGO, default "PADDLE" |
| disable_mkldnn | Whether to disable mkldnn for paddle backend, default false. |

### 5.1 benchmark工具使用示例
### 5.1 benchmark工具使用示例
- 用法说明
```bash
./benchmark --helpshort
benchmark: ./benchmark -[info|diff|check|dump|mem] -model xxx -config_path xxx -[shapes|dtypes|names|tensors] -[model_file|params_file|model_format]
...
```
- 单输入示例:
```bash
./benchmark --model ResNet50_vd_infer --config_path config/config.x86.ov.fp32.txt --shapes 1,3,224,224 --names inputs --dtypes FP32
Expand Down
2 changes: 2 additions & 0 deletions benchmark/cpp/benchmark.cc
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,8 @@ static void showInputInfos(int argc, char* argv[]) {

int main(int argc, char* argv[]) {
#if defined(ENABLE_BENCHMARK)
google::SetVersionString("0.0.0");
google::SetUsageMessage("./benchmark -[info|diff|check|dump|mem] -model xxx -config_path xxx -[shapes|dtypes|names|tensors] -[model_file|params_file|model_format]");
google::ParseCommandLineFlags(&argc, &argv, true);
if (FLAGS_diff) {
CheckTensorDiff(argc, argv);
Expand Down

0 comments on commit 430fc42

Please sign in to comment.