From bc9d8b5ea83ae0577a33c73e87475aef22f5a879 Mon Sep 17 00:00:00 2001 From: xzl Date: Mon, 9 Oct 2017 20:08:55 +0800 Subject: [PATCH] modify all proto used in inference with RUNTIME_LITE, delete Unnecessary proto druning inference process --- proto/CMakeLists.txt | 8 +++++++- proto/DataConfig.proto | 2 ++ proto/ModelConfig.proto | 1 + proto/ParameterConfig.proto | 2 ++ proto/ParameterService.proto | 2 ++ proto/TrainerConfig.proto | 2 ++ 6 files changed, 16 insertions(+), 1 deletion(-) diff --git a/proto/CMakeLists.txt b/proto/CMakeLists.txt index 6212c2e60a8..5d898d860cf 100644 --- a/proto/CMakeLists.txt +++ b/proto/CMakeLists.txt @@ -1,4 +1,10 @@ -file(GLOB proto_filenames . *.proto) +if (MOBILE_INFERENCE) + file(GLOB proto_filenames . ModelConfig.proto ParameterConfig.proto + TrainerConfig.proto DataConfig.proto) +else() + file(GLOB proto_filenames . *.proto) +endif() + include_directories(${CMAKE_CURRENT_BINARY_DIR}) proto_library(paddle_proto SRCS ${proto_filenames}) diff --git a/proto/DataConfig.proto b/proto/DataConfig.proto index 0cb5d7afbb3..c11e69c8abb 100644 --- a/proto/DataConfig.proto +++ b/proto/DataConfig.proto @@ -13,6 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. */ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package paddle; message FileGroupConf { diff --git a/proto/ModelConfig.proto b/proto/ModelConfig.proto index ebf0911d6ea..a0db95b6e7b 100644 --- a/proto/ModelConfig.proto +++ b/proto/ModelConfig.proto @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and limitations under the License. */ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; import "ParameterConfig.proto"; package paddle; diff --git a/proto/ParameterConfig.proto b/proto/ParameterConfig.proto index b13570a2c6e..f043f5a0a4a 100644 --- a/proto/ParameterConfig.proto +++ b/proto/ParameterConfig.proto @@ -13,6 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. */ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + package paddle; /** diff --git a/proto/ParameterService.proto b/proto/ParameterService.proto index e3c180ccc3f..40c2f9d6249 100644 --- a/proto/ParameterService.proto +++ b/proto/ParameterService.proto @@ -13,6 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. */ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + import "ParameterConfig.proto"; import "TrainerConfig.proto"; diff --git a/proto/TrainerConfig.proto b/proto/TrainerConfig.proto index b7c2355159e..2a7e7f736a5 100644 --- a/proto/TrainerConfig.proto +++ b/proto/TrainerConfig.proto @@ -13,6 +13,8 @@ See the License for the specific language governing permissions and limitations under the License. */ syntax = "proto2"; +option optimize_for = LITE_RUNTIME; + import "DataConfig.proto"; import "ModelConfig.proto"; -- GitLab