Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
8b7f45a8
P
Paddle
项目概览
Crayon鑫
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
8b7f45a8
编写于
10月 24, 2018
作者:
T
tangwei12
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add longs in framework
上级
f3729db6
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
10 addition
and
1 deletion
+10
-1
paddle/fluid/framework/framework.proto
paddle/fluid/framework/framework.proto
+2
-0
paddle/fluid/framework/op_desc.cc
paddle/fluid/framework/op_desc.cc
+5
-0
paddle/fluid/framework/type_defs.h
paddle/fluid/framework/type_defs.h
+1
-1
paddle/fluid/pybind/protobuf.cc
paddle/fluid/pybind/protobuf.cc
+2
-0
未找到文件。
paddle/fluid/framework/framework.proto
浏览文件 @
8b7f45a8
...
@@ -35,6 +35,7 @@ enum AttrType {
...
@@ -35,6 +35,7 @@ enum AttrType {
BLOCK
=
8
;
BLOCK
=
8
;
LONG
=
9
;
LONG
=
9
;
BLOCKS
=
10
;
BLOCKS
=
10
;
LONGS
=
11
;
}
}
// OpDesc describes an instance of a C++ framework::OperatorBase
// OpDesc describes an instance of a C++ framework::OperatorBase
...
@@ -55,6 +56,7 @@ message OpDesc {
...
@@ -55,6 +56,7 @@ message OpDesc {
optional
int32
block_idx
=
12
;
optional
int32
block_idx
=
12
;
optional
int64
l
=
13
;
optional
int64
l
=
13
;
repeated
int32
blocks_idx
=
14
;
repeated
int32
blocks_idx
=
14
;
optional
int64
longs
=
15
;
};
};
message
Var
{
message
Var
{
...
...
paddle/fluid/framework/op_desc.cc
浏览文件 @
8b7f45a8
...
@@ -421,6 +421,11 @@ struct SetAttrDescVisitor : public boost::static_visitor<void> {
...
@@ -421,6 +421,11 @@ struct SetAttrDescVisitor : public boost::static_visitor<void> {
}
}
void
operator
()(
BlockDesc
*
desc
)
const
{
attr_
->
set_block_idx
(
desc
->
ID
());
}
void
operator
()(
BlockDesc
*
desc
)
const
{
attr_
->
set_block_idx
(
desc
->
ID
());
}
void
operator
()(
int64_t
v
)
const
{
attr_
->
set_l
(
v
);
}
void
operator
()(
int64_t
v
)
const
{
attr_
->
set_l
(
v
);
}
void
operator
()(
const
std
::
vector
<
int64_t
>
&
v
)
const
{
VectorToRepeated
(
v
,
attr_
->
mutable_longs
());
}
void
operator
()(
boost
::
blank
)
const
{
PADDLE_THROW
(
"Unexpected branch"
);
}
void
operator
()(
boost
::
blank
)
const
{
PADDLE_THROW
(
"Unexpected branch"
);
}
};
};
...
...
paddle/fluid/framework/type_defs.h
浏览文件 @
8b7f45a8
...
@@ -36,7 +36,7 @@ using Attribute =
...
@@ -36,7 +36,7 @@ using Attribute =
boost
::
variant
<
boost
::
blank
,
int
,
float
,
std
::
string
,
std
::
vector
<
int
>
,
boost
::
variant
<
boost
::
blank
,
int
,
float
,
std
::
string
,
std
::
vector
<
int
>
,
std
::
vector
<
float
>
,
std
::
vector
<
std
::
string
>
,
bool
,
std
::
vector
<
float
>
,
std
::
vector
<
std
::
string
>
,
bool
,
std
::
vector
<
bool
>
,
BlockDesc
*
,
int64_t
,
std
::
vector
<
bool
>
,
BlockDesc
*
,
int64_t
,
std
::
vector
<
BlockDesc
*>>
;
std
::
vector
<
BlockDesc
*>
,
std
::
vector
<
int64_t
>
>
;
using
AttributeMap
=
std
::
unordered_map
<
std
::
string
,
Attribute
>
;
using
AttributeMap
=
std
::
unordered_map
<
std
::
string
,
Attribute
>
;
...
...
paddle/fluid/pybind/protobuf.cc
浏览文件 @
8b7f45a8
...
@@ -259,6 +259,8 @@ void BindOpDesc(pybind11::module *m) {
...
@@ -259,6 +259,8 @@ void BindOpDesc(pybind11::module *m) {
pybind11
::
enum_
<
pd
::
proto
::
AttrType
>
(
*
m
,
"AttrType"
,
""
)
pybind11
::
enum_
<
pd
::
proto
::
AttrType
>
(
*
m
,
"AttrType"
,
""
)
.
value
(
"INT"
,
pd
::
proto
::
AttrType
::
INT
)
.
value
(
"INT"
,
pd
::
proto
::
AttrType
::
INT
)
.
value
(
"INTS"
,
pd
::
proto
::
AttrType
::
INTS
)
.
value
(
"INTS"
,
pd
::
proto
::
AttrType
::
INTS
)
.
value
(
"LONG"
,
pd
::
proto
::
AttrType
::
FLOAT
)
.
value
(
"LONGS"
,
pd
::
proto
::
AttrType
::
FLOAT
)
.
value
(
"FLOAT"
,
pd
::
proto
::
AttrType
::
FLOAT
)
.
value
(
"FLOAT"
,
pd
::
proto
::
AttrType
::
FLOAT
)
.
value
(
"FLOATS"
,
pd
::
proto
::
AttrType
::
FLOATS
)
.
value
(
"FLOATS"
,
pd
::
proto
::
AttrType
::
FLOATS
)
.
value
(
"STRING"
,
pd
::
proto
::
AttrType
::
STRING
)
.
value
(
"STRING"
,
pd
::
proto
::
AttrType
::
STRING
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录