Skip to content

Commit

Permalink
fixed paddle inference cpu_num_threads setting (PaddlePaddle#64)
Browse files Browse the repository at this point in the history
  • Loading branch information
DefTruth authored Aug 2, 2022
1 parent 90e0f53 commit 59c374e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion csrcs/fastdeploy/fastdeploy_runtime.cc
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ void RuntimeOption::SetTrtCacheFile(const std::string& cache_file_path) {
trt_serialize_file = cache_file_path;
}


bool Runtime::Init(const RuntimeOption& _option) {
option = _option;
if (option.model_format == Frontend::AUTOREC) {
Expand Down Expand Up @@ -274,6 +273,7 @@ void Runtime::CreatePaddleBackend() {
pd_option.mkldnn_cache_size = option.pd_mkldnn_cache_size;
pd_option.use_gpu = (option.device == Device::GPU) ? true : false;
pd_option.gpu_id = option.device_id;
pd_option.cpu_thread_num = option.cpu_thread_num;
FDASSERT(option.model_format == Frontend::PADDLE,
"PaddleBackend only support model format of Frontend::PADDLE.");
backend_ = new PaddleBackend();
Expand Down
6 changes: 5 additions & 1 deletion examples/resources/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ models/*.pd*
models/*.engine
models/*.trt
models/*.nb
models/*param*
models/*model*
outputs/*.jpg
outputs/*.jpeg
outputs/*.png
outputs/*.png
outputs/*.txt
outputs/*.json

0 comments on commit 59c374e

Please sign in to comment.