提交 5858441b 编写于 作者: littletomatodonkey's avatar littletomatodonkey

add notes

上级 f78678dd
......@@ -26,6 +26,7 @@ void DBDetector::LoadModel(const std::string &model_dir) {
config.DisableGpu();
if (this->use_mkldnn_) {
config.EnableMKLDNN();
// cache 10 different shapes for mkldnn to avoid memory leak
config.SetMkldnnCacheCapacity(10);
}
config.SetCpuMathLibraryNumThreads(this->cpu_math_library_num_threads_);
......
......@@ -126,6 +126,7 @@ void CRNNRecognizer::LoadModel(const std::string &model_dir) {
config.DisableGpu();
if (this->use_mkldnn_) {
config.EnableMKLDNN();
// cache 10 different shapes for mkldnn to avoid memory leak
config.SetMkldnnCacheCapacity(10);
}
config.SetCpuMathLibraryNumThreads(this->cpu_math_library_num_threads_);
......
......@@ -3,7 +3,7 @@ use_gpu 0
gpu_id 0
gpu_mem 4000
cpu_math_library_num_threads 10
use_mkldnn 0
use_mkldnn 1
use_zero_copy_run 1
# det config
......
......@@ -101,6 +101,7 @@ def create_predictor(args, mode):
config.disable_gpu()
config.set_cpu_math_library_num_threads(6)
if args.enable_mkldnn:
# cache 10 different shapes for mkldnn to avoid memory leak
config.set_mkldnn_cache_capacity(10)
config.enable_mkldnn()
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册