From 6be53f8a7133e4b23dfc3cf4a98990f160d69f75 Mon Sep 17 00:00:00 2001 From: wangguibao Date: Fri, 27 Sep 2019 16:30:00 +0800 Subject: [PATCH] Fix EnableMemoryOptim interface --- inferencer-fluid-cpu/include/fluid_cpu_engine.h | 9 +++------ inferencer-fluid-gpu/include/fluid_gpu_engine.h | 9 +++------ 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/inferencer-fluid-cpu/include/fluid_cpu_engine.h b/inferencer-fluid-cpu/include/fluid_cpu_engine.h index b951670e..a7ba3ae1 100644 --- a/inferencer-fluid-cpu/include/fluid_cpu_engine.h +++ b/inferencer-fluid-cpu/include/fluid_cpu_engine.h @@ -134,8 +134,7 @@ class FluidCpuAnalysisCore : public FluidFamilyCore { analysis_config.SetCpuMathLibraryNumThreads(1); if (params.enable_memory_optimization()) { - analysis_config.EnableMemoryOptim(params.static_optimization(), - params.force_update_static_cache()); + analysis_config.EnableMemoryOptim(); } analysis_config.SwitchSpecifyInputNames(true); @@ -200,8 +199,7 @@ class FluidCpuAnalysisDirCore : public FluidFamilyCore { analysis_config.SetCpuMathLibraryNumThreads(1); if (params.enable_memory_optimization()) { - analysis_config.EnableMemoryOptim(params.static_optimization(), - params.force_update_static_cache()); + analysis_config.EnableMemoryOptim(); } AutoLock lock(GlobalPaddleCreateMutex::instance()); @@ -519,8 +517,7 @@ class FluidCpuAnalysisDirWithSigmoidCore : public FluidCpuWithSigmoidCore { analysis_config.SetCpuMathLibraryNumThreads(1); if (params.enable_memory_optimization()) { - analysis_config.EnableMemoryOptim(params.static_optimization(), - params.force_update_static_cache()); + analysis_config.EnableMemoryOptim(); } AutoLock lock(GlobalPaddleCreateMutex::instance()); diff --git a/inferencer-fluid-gpu/include/fluid_gpu_engine.h b/inferencer-fluid-gpu/include/fluid_gpu_engine.h index 30bae22d..c21a43ba 100644 --- a/inferencer-fluid-gpu/include/fluid_gpu_engine.h +++ b/inferencer-fluid-gpu/include/fluid_gpu_engine.h @@ -136,8 +136,7 @@ class FluidGpuAnalysisCore : public FluidFamilyCore { analysis_config.SetCpuMathLibraryNumThreads(1); if (params.enable_memory_optimization()) { - analysis_config.EnableMemoryOptim(params.static_optimization(), - params.force_update_static_cache()); + analysis_config.EnableMemoryOptim(); } analysis_config.SwitchSpecifyInputNames(true); @@ -202,8 +201,7 @@ class FluidGpuAnalysisDirCore : public FluidFamilyCore { analysis_config.SetCpuMathLibraryNumThreads(1); if (params.enable_memory_optimization()) { - analysis_config.EnableMemoryOptim(params.static_optimization(), - params.force_update_static_cache()); + analysis_config.EnableMemoryOptim(); } AutoLock lock(GlobalPaddleCreateMutex::instance()); @@ -521,8 +519,7 @@ class FluidGpuAnalysisDirWithSigmoidCore : public FluidGpuWithSigmoidCore { analysis_config.SetCpuMathLibraryNumThreads(1); if (params.enable_memory_optimization()) { - analysis_config.EnableMemoryOptim(params.static_optimization(), - params.force_update_static_cache()); + analysis_config.EnableMemoryOptim(); } AutoLock lock(GlobalPaddleCreateMutex::instance()); -- GitLab