Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Crayon鑫
Paddle
提交
eb529128
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看板
未验证
提交
eb529128
编写于
6月 25, 2021
作者:
王
王明冬
提交者:
GitHub
6月 25, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix the attributes error in transpose.pbtxt,test=develop. (#33770)
上级
2c4cc68f
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
9 addition
and
8 deletion
+9
-8
paddle/fluid/framework/ir/mkldnn/matmul_transpose_reshape_fuse_pass.cc
...framework/ir/mkldnn/matmul_transpose_reshape_fuse_pass.cc
+5
-3
paddle/fluid/framework/ir/mkldnn/matmul_transpose_reshape_fuse_pass_tester.cc
...rk/ir/mkldnn/matmul_transpose_reshape_fuse_pass_tester.cc
+0
-1
paddle/fluid/operators/compat/transpose.pbtxt
paddle/fluid/operators/compat/transpose.pbtxt
+2
-2
paddle/fluid/operators/compat/transpose2.pbtxt
paddle/fluid/operators/compat/transpose2.pbtxt
+2
-2
未找到文件。
paddle/fluid/framework/ir/mkldnn/matmul_transpose_reshape_fuse_pass.cc
浏览文件 @
eb529128
...
@@ -34,10 +34,13 @@ MatmulTransposeReshapeMKLDNNPass::MatmulTransposeReshapeMKLDNNPass() {
...
@@ -34,10 +34,13 @@ MatmulTransposeReshapeMKLDNNPass::MatmulTransposeReshapeMKLDNNPass() {
.
IsTensor
()
.
IsTensor
()
.
End
()
.
End
()
.
AddAttr
(
"alpha"
)
// unconstrained. can be any float value.
.
AddAttr
(
"alpha"
)
// unconstrained. can be any float value.
.
IsType
<
float
>
()
.
End
()
.
End
()
.
AddAttr
(
"transpose_X"
)
// unconstrained. can be any bool value.
.
AddAttr
(
"transpose_X"
)
// unconstrained. can be any bool value.
.
IsType
<
bool
>
()
.
End
()
.
End
()
.
AddAttr
(
"transpose_Y"
)
// unconstrained. can be any bool value.
.
AddAttr
(
"transpose_Y"
)
// unconstrained. can be any bool value.
.
IsType
<
bool
>
()
.
End
();
.
End
();
AddOpCompat
(
OpCompat
(
"transpose2"
))
AddOpCompat
(
OpCompat
(
"transpose2"
))
...
@@ -51,9 +54,7 @@ MatmulTransposeReshapeMKLDNNPass::MatmulTransposeReshapeMKLDNNPass() {
...
@@ -51,9 +54,7 @@ MatmulTransposeReshapeMKLDNNPass::MatmulTransposeReshapeMKLDNNPass() {
.
IsTensor
()
.
IsTensor
()
.
End
()
.
End
()
.
AddAttr
(
"axis"
)
// ints
.
AddAttr
(
"axis"
)
// ints
.
End
()
.
IsType
<
std
::
vector
<
int
>>
()
.
AddAttr
(
"data_format"
)
.
IsStringIn
({
"NHWC"
,
"NCHW"
,
"AnyLayout"
})
.
End
();
.
End
();
AddOpCompat
(
OpCompat
(
"reshape2"
))
AddOpCompat
(
OpCompat
(
"reshape2"
))
...
@@ -75,6 +76,7 @@ MatmulTransposeReshapeMKLDNNPass::MatmulTransposeReshapeMKLDNNPass() {
...
@@ -75,6 +76,7 @@ MatmulTransposeReshapeMKLDNNPass::MatmulTransposeReshapeMKLDNNPass() {
.
IsTensor
()
.
IsTensor
()
.
End
()
.
End
()
.
AddAttr
(
"shape"
)
// ints
.
AddAttr
(
"shape"
)
// ints
.
IsType
<
std
::
vector
<
int
>>
()
.
End
();
.
End
();
}
}
void
MatmulTransposeReshapeMKLDNNPass
::
ApplyImpl
(
ir
::
Graph
*
graph
)
const
{
void
MatmulTransposeReshapeMKLDNNPass
::
ApplyImpl
(
ir
::
Graph
*
graph
)
const
{
...
...
paddle/fluid/framework/ir/mkldnn/matmul_transpose_reshape_fuse_pass_tester.cc
浏览文件 @
eb529128
...
@@ -28,7 +28,6 @@ void SetOp(ProgramDesc *prog, const std::string &type,
...
@@ -28,7 +28,6 @@ void SetOp(ProgramDesc *prog, const std::string &type,
op
->
SetOutput
(
"Out"
,
{
outputs
[
0
]});
op
->
SetOutput
(
"Out"
,
{
outputs
[
0
]});
if
(
type
==
"transpose2"
)
{
if
(
type
==
"transpose2"
)
{
op
->
SetAttr
(
"axis"
,
std
::
vector
<
int
>
({
0
,
2
,
1
,
3
}));
op
->
SetAttr
(
"axis"
,
std
::
vector
<
int
>
({
0
,
2
,
1
,
3
}));
op
->
SetAttr
(
"data_format"
,
std
::
string
(
"NCHW"
));
op
->
SetOutput
(
"XShape"
,
{
outputs
[
1
]});
op
->
SetOutput
(
"XShape"
,
{
outputs
[
1
]});
}
}
if
(
type
==
"reshape2"
)
{
if
(
type
==
"reshape2"
)
{
...
...
paddle/fluid/operators/compat/transpose.pbtxt
浏览文件 @
eb529128
...
@@ -10,12 +10,12 @@ def {
...
@@ -10,12 +10,12 @@ def {
name: "axis"
name: "axis"
type: INTS
type: INTS
}
}
}
extra {
attrs {
attrs {
name: "data_format"
name: "data_format"
type: STRING
type: STRING
}
}
}
extra {
attrs {
attrs {
name: "use_mkldnn"
name: "use_mkldnn"
type: BOOLEAN
type: BOOLEAN
...
...
paddle/fluid/operators/compat/transpose2.pbtxt
浏览文件 @
eb529128
...
@@ -13,12 +13,12 @@ def {
...
@@ -13,12 +13,12 @@ def {
name: "axis"
name: "axis"
type: INTS
type: INTS
}
}
}
extra {
attrs {
attrs {
name: "data_format"
name: "data_format"
type: STRING
type: STRING
}
}
}
extra {
attrs {
attrs {
name: "use_mkldnn"
name: "use_mkldnn"
type: BOOLEAN
type: BOOLEAN
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录