mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-05 16:48:03 +08:00
[benchmark] add disable_mkldnn option for paddle infer backend to support 3D model benchmark (#1866)
[benchmark] add disable_mkldnn option for paddle infer backend to support 3D model
This commit is contained in:
@@ -39,6 +39,7 @@ DEFINE_string(params_file, "", "Optional, set specific params file,"
|
||||
"eg, model.pdiparams.");
|
||||
DEFINE_string(model_format, "PADDLE", "Optional, set specific model format,"
|
||||
"eg, PADDLE/ONNX/RKNN/TORCHSCRIPT/SOPHGO");
|
||||
DEFINE_bool(disable_mkldnn, false, "disable mkldnn for paddle backend");
|
||||
|
||||
#if defined(ENABLE_BENCHMARK)
|
||||
static std::vector<int64_t> GetInt64Shape(const std::vector<int>& shape) {
|
||||
@@ -88,6 +89,9 @@ static void RuntimeProfiling(int argc, char* argv[]) {
|
||||
if (!CreateRuntimeOption(&option, argc, argv, true)) {
|
||||
return;
|
||||
}
|
||||
if (FLAGS_disable_mkldnn) {
|
||||
option.paddle_infer_option.enable_mkldnn = false;
|
||||
}
|
||||
std::unordered_map<std::string, std::string> config_info;
|
||||
benchmark::ResultManager::LoadBenchmarkConfig(FLAGS_config_path,
|
||||
&config_info);
|
||||
|
Reference in New Issue
Block a user