未验证 提交 013a552b 编写于 作者: W Wang Guibao 提交者: GitHub

Merge pull request #82 from wangguibao/binary_inference_lib

Fix EnableMemoryOptim interface
...@@ -134,8 +134,7 @@ class FluidCpuAnalysisCore : public FluidFamilyCore { ...@@ -134,8 +134,7 @@ class FluidCpuAnalysisCore : public FluidFamilyCore {
analysis_config.SetCpuMathLibraryNumThreads(1); analysis_config.SetCpuMathLibraryNumThreads(1);
if (params.enable_memory_optimization()) { if (params.enable_memory_optimization()) {
analysis_config.EnableMemoryOptim(params.static_optimization(), analysis_config.EnableMemoryOptim();
params.force_update_static_cache());
} }
analysis_config.SwitchSpecifyInputNames(true); analysis_config.SwitchSpecifyInputNames(true);
...@@ -200,8 +199,7 @@ class FluidCpuAnalysisDirCore : public FluidFamilyCore { ...@@ -200,8 +199,7 @@ class FluidCpuAnalysisDirCore : public FluidFamilyCore {
analysis_config.SetCpuMathLibraryNumThreads(1); analysis_config.SetCpuMathLibraryNumThreads(1);
if (params.enable_memory_optimization()) { if (params.enable_memory_optimization()) {
analysis_config.EnableMemoryOptim(params.static_optimization(), analysis_config.EnableMemoryOptim();
params.force_update_static_cache());
} }
AutoLock lock(GlobalPaddleCreateMutex::instance()); AutoLock lock(GlobalPaddleCreateMutex::instance());
...@@ -519,8 +517,7 @@ class FluidCpuAnalysisDirWithSigmoidCore : public FluidCpuWithSigmoidCore { ...@@ -519,8 +517,7 @@ class FluidCpuAnalysisDirWithSigmoidCore : public FluidCpuWithSigmoidCore {
analysis_config.SetCpuMathLibraryNumThreads(1); analysis_config.SetCpuMathLibraryNumThreads(1);
if (params.enable_memory_optimization()) { if (params.enable_memory_optimization()) {
analysis_config.EnableMemoryOptim(params.static_optimization(), analysis_config.EnableMemoryOptim();
params.force_update_static_cache());
} }
AutoLock lock(GlobalPaddleCreateMutex::instance()); AutoLock lock(GlobalPaddleCreateMutex::instance());
......
...@@ -136,8 +136,7 @@ class FluidGpuAnalysisCore : public FluidFamilyCore { ...@@ -136,8 +136,7 @@ class FluidGpuAnalysisCore : public FluidFamilyCore {
analysis_config.SetCpuMathLibraryNumThreads(1); analysis_config.SetCpuMathLibraryNumThreads(1);
if (params.enable_memory_optimization()) { if (params.enable_memory_optimization()) {
analysis_config.EnableMemoryOptim(params.static_optimization(), analysis_config.EnableMemoryOptim();
params.force_update_static_cache());
} }
analysis_config.SwitchSpecifyInputNames(true); analysis_config.SwitchSpecifyInputNames(true);
...@@ -202,8 +201,7 @@ class FluidGpuAnalysisDirCore : public FluidFamilyCore { ...@@ -202,8 +201,7 @@ class FluidGpuAnalysisDirCore : public FluidFamilyCore {
analysis_config.SetCpuMathLibraryNumThreads(1); analysis_config.SetCpuMathLibraryNumThreads(1);
if (params.enable_memory_optimization()) { if (params.enable_memory_optimization()) {
analysis_config.EnableMemoryOptim(params.static_optimization(), analysis_config.EnableMemoryOptim();
params.force_update_static_cache());
} }
AutoLock lock(GlobalPaddleCreateMutex::instance()); AutoLock lock(GlobalPaddleCreateMutex::instance());
...@@ -521,8 +519,7 @@ class FluidGpuAnalysisDirWithSigmoidCore : public FluidGpuWithSigmoidCore { ...@@ -521,8 +519,7 @@ class FluidGpuAnalysisDirWithSigmoidCore : public FluidGpuWithSigmoidCore {
analysis_config.SetCpuMathLibraryNumThreads(1); analysis_config.SetCpuMathLibraryNumThreads(1);
if (params.enable_memory_optimization()) { if (params.enable_memory_optimization()) {
analysis_config.EnableMemoryOptim(params.static_optimization(), analysis_config.EnableMemoryOptim();
params.force_update_static_cache());
} }
AutoLock lock(GlobalPaddleCreateMutex::instance()); AutoLock lock(GlobalPaddleCreateMutex::instance());
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册