diff --git a/proto/CMakeLists.txt b/proto/CMakeLists.txt index 6212c2e60a8ed94ecc1d6e58535a2b3d365e3eb8..5d898d860cfc6dc26eaf5a81d8aed6d757ed5831 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 0cb5d7afbb3e1cb4abe45c0ed677e09b27b870fa..c11e69c8abbcaeaff6ef46851a4d5c9a5b1c36cf 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 ebf0911d6ea0b39d51447859ae2aef485b50b0e6..a0db95b6e7be3724b2d4499d2091fa53d962eca3 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 b13570a2c6e7b16e45892a31bb496a9dd2099df0..f043f5a0a4ad8bbb5062f01f3eaa10490361a402 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 e3c180ccc3f2a9bfa13c443944cc5ae3398818a9..40c2f9d624902a1df17ad63ac91436d5cfb8e137 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 b7c2355159e66be0a1550d3c8fde9a15346ff7e4..2a7e7f736a5f82f07161ab42ab3075fc76fb131d 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";