Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
Paddle
提交
5b4bec43
P
Paddle
项目概览
BaiXuePrincess
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
5b4bec43
编写于
11月 28, 2016
作者:
Y
Yu Yang
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add syntax='proto2' when using protobuf 3
上级
30fc33c7
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
20 addition
and
2 deletion
+20
-2
proto/CMakeLists.txt
proto/CMakeLists.txt
+14
-1
proto/DataConfig.proto.m4
proto/DataConfig.proto.m4
+1
-0
proto/DataFormat.proto.m4
proto/DataFormat.proto.m4
+1
-0
proto/ModelConfig.proto.m4
proto/ModelConfig.proto.m4
+1
-0
proto/ParameterConfig.proto.m4
proto/ParameterConfig.proto.m4
+1
-0
proto/ParameterService.proto.m4
proto/ParameterService.proto.m4
+1
-1
proto/TrainerConfig.proto.m4
proto/TrainerConfig.proto.m4
+1
-0
未找到文件。
proto/CMakeLists.txt
浏览文件 @
5b4bec43
execute_process
(
COMMAND
${
PROTOBUF_PROTOC_EXECUTABLE
}
--version
OUTPUT_VARIABLE PROTOBUF_VERSION
)
string
(
REPLACE
"libprotoc "
""
PROTOBUF_VERSION
${
PROTOBUF_VERSION
}
)
set
(
PROTOBUF_3 OFF
)
if
(
${
PROTOBUF_VERSION
}
VERSION_GREATER
"3.0.0"
OR
${
PROTOBUF_VERSION
}
VERSION_EQUAL
"3.0.0"
)
set
(
PROTOBUF_3 ON
)
endif
()
set
(
proto_filenames
set
(
proto_filenames
DataConfig.proto
DataConfig.proto
DataFormat.proto
DataFormat.proto
...
@@ -11,8 +20,12 @@ set(real_proto_files)
...
@@ -11,8 +20,12 @@ set(real_proto_files)
# TODO(yuyang18): Some internal proto will also be depended on.
# TODO(yuyang18): Some internal proto will also be depended on.
# Find a way to automatically calculate all depends.
# Find a way to automatically calculate all depends.
foreach
(
filename
${
proto_filenames
}
)
foreach
(
filename
${
proto_filenames
}
)
set
(
PROTOBUF_3_FLAGS
""
)
if
(
PROTOBUF_3
)
set
(
PROTOBUF_3_FLAGS
"-Dproto3"
)
endif
()
add_custom_command
(
OUTPUT
${
filename
}
add_custom_command
(
OUTPUT
${
filename
}
COMMAND
${
M4_EXECUTABLE
}
-Dreal=
${
ACCURACY
}
-I '
${
INTERNAL_PROTO_PATH
}
'
COMMAND
${
M4_EXECUTABLE
}
-Dreal=
${
ACCURACY
}
${
PROTOBUF_3_FLAGS
}
-I '
${
INTERNAL_PROTO_PATH
}
'
${
PROJ_ROOT
}
/proto/
${
filename
}
.m4 >
${
filename
}
${
PROJ_ROOT
}
/proto/
${
filename
}
.m4 >
${
filename
}
DEPENDS
${
PROJ_ROOT
}
/proto/
${
filename
}
.m4
DEPENDS
${
PROJ_ROOT
}
/proto/
${
filename
}
.m4
COMMENT
"Generate
${
filename
}
"
)
COMMENT
"Generate
${
filename
}
"
)
...
...
proto/DataConfig.proto.m4
浏览文件 @
5b4bec43
...
@@ -11,6 +11,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
...
@@ -11,6 +11,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT
WARRANTIES
OR
CONDITIONS
OF
ANY
KIND
,
either
express
or
implied
.
WITHOUT
WARRANTIES
OR
CONDITIONS
OF
ANY
KIND
,
either
express
or
implied
.
See
the
License
for
the
specific
language
governing
permissions
and
See
the
License
for
the
specific
language
governing
permissions
and
limitations
under
the
License
.
*/
limitations
under
the
License
.
*/
ifdef
(`
proto3
', `syntax = "proto2";'
)
package
paddle
;
package
paddle
;
...
...
proto/DataFormat.proto.m4
浏览文件 @
5b4bec43
...
@@ -11,6 +11,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
...
@@ -11,6 +11,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT
WARRANTIES
OR
CONDITIONS
OF
ANY
KIND
,
either
express
or
implied
.
WITHOUT
WARRANTIES
OR
CONDITIONS
OF
ANY
KIND
,
either
express
or
implied
.
See
the
License
for
the
specific
language
governing
permissions
and
See
the
License
for
the
specific
language
governing
permissions
and
limitations
under
the
License
.
*/
limitations
under
the
License
.
*/
ifdef
(`
proto3
', `syntax = "proto2";'
)
package
paddle
;
package
paddle
;
...
...
proto/ModelConfig.proto.m4
浏览文件 @
5b4bec43
...
@@ -11,6 +11,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
...
@@ -11,6 +11,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT
WARRANTIES
OR
CONDITIONS
OF
ANY
KIND
,
either
express
or
implied
.
WITHOUT
WARRANTIES
OR
CONDITIONS
OF
ANY
KIND
,
either
express
or
implied
.
See
the
License
for
the
specific
language
governing
permissions
and
See
the
License
for
the
specific
language
governing
permissions
and
limitations
under
the
License
.
*/
limitations
under
the
License
.
*/
ifdef
(`
proto3
', `syntax = "proto2";'
)
import
"ParameterConfig.proto"
;
import
"ParameterConfig.proto"
;
...
...
proto/ParameterConfig.proto.m4
浏览文件 @
5b4bec43
...
@@ -11,6 +11,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
...
@@ -11,6 +11,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT
WARRANTIES
OR
CONDITIONS
OF
ANY
KIND
,
either
express
or
implied
.
WITHOUT
WARRANTIES
OR
CONDITIONS
OF
ANY
KIND
,
either
express
or
implied
.
See
the
License
for
the
specific
language
governing
permissions
and
See
the
License
for
the
specific
language
governing
permissions
and
limitations
under
the
License
.
*/
limitations
under
the
License
.
*/
ifdef
(`
proto3
', `syntax = "proto2";'
)
package
paddle
;
package
paddle
;
...
...
proto/ParameterService.proto.m4
浏览文件 @
5b4bec43
...
@@ -11,6 +11,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
...
@@ -11,6 +11,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT
WARRANTIES
OR
CONDITIONS
OF
ANY
KIND
,
either
express
or
implied
.
WITHOUT
WARRANTIES
OR
CONDITIONS
OF
ANY
KIND
,
either
express
or
implied
.
See
the
License
for
the
specific
language
governing
permissions
and
See
the
License
for
the
specific
language
governing
permissions
and
limitations
under
the
License
.
*/
limitations
under
the
License
.
*/
ifdef
(`
proto3
', `syntax = "proto2";'
)
import
"ParameterConfig.proto"
;
import
"ParameterConfig.proto"
;
import
"TrainerConfig.proto"
;
import
"TrainerConfig.proto"
;
...
@@ -20,7 +21,6 @@ package paddle;
...
@@ -20,7 +21,6 @@ package paddle;
/**
/**
*
Various
structs
for
communicating
with
parameter
server
*
Various
structs
for
communicating
with
parameter
server
*/
*/
enum
ParameterUpdateMode
{
enum
ParameterUpdateMode
{
//
Set
parameter
//
Set
parameter
PSERVER_UPDATE_MODE_SET_PARAM
=
0
;//
use
local
param
PSERVER_UPDATE_MODE_SET_PARAM
=
0
;//
use
local
param
...
...
proto/TrainerConfig.proto.m4
浏览文件 @
5b4bec43
...
@@ -11,6 +11,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
...
@@ -11,6 +11,7 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT
WARRANTIES
OR
CONDITIONS
OF
ANY
KIND
,
either
express
or
implied
.
WITHOUT
WARRANTIES
OR
CONDITIONS
OF
ANY
KIND
,
either
express
or
implied
.
See
the
License
for
the
specific
language
governing
permissions
and
See
the
License
for
the
specific
language
governing
permissions
and
limitations
under
the
License
.
*/
limitations
under
the
License
.
*/
ifdef
(`
proto3
', `syntax = "proto2";'
)
import
"DataConfig.proto"
;
import
"DataConfig.proto"
;
import
"ModelConfig.proto"
;
import
"ModelConfig.proto"
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录