Skip to content

Commit

Permalink
modify all proto used in inference with RUNTIME_LITE, delete Unnecess…
Browse files Browse the repository at this point in the history
…ary proto druning inference process
  • Loading branch information
NHZlX committed Oct 9, 2017
1 parent 3a68955 commit bc9d8b5
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 1 deletion.
8 changes: 7 additions & 1 deletion proto/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -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})

Expand Down
2 changes: 2 additions & 0 deletions proto/DataConfig.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
1 change: 1 addition & 0 deletions proto/ModelConfig.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 2 additions & 0 deletions proto/ParameterConfig.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand Down
2 changes: 2 additions & 0 deletions proto/ParameterService.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
2 changes: 2 additions & 0 deletions proto/TrainerConfig.proto
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down

0 comments on commit bc9d8b5

Please sign in to comment.