Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
5f198a6e
P
Paddle
项目概览
机器未来
/
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看板
未验证
提交
5f198a6e
编写于
6月 23, 2021
作者:
石
石晓伟
提交者:
GitHub
6月 23, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
add op_compat for the seqpool_cvm_concat_fuse_pass, test=develop (#33559)
上级
aa1aac9d
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
133 addition
and
1 deletion
+133
-1
paddle/fluid/framework/ir/seqpool_cvm_concat_fuse_pass.cc
paddle/fluid/framework/ir/seqpool_cvm_concat_fuse_pass.cc
+46
-0
paddle/fluid/framework/ir/seqpool_cvm_concat_fuse_pass.h
paddle/fluid/framework/ir/seqpool_cvm_concat_fuse_pass.h
+1
-1
paddle/fluid/operators/compat/cvm.pbtxt
paddle/fluid/operators/compat/cvm.pbtxt
+39
-0
paddle/fluid/operators/compat/sequence_pool.pbtxt
paddle/fluid/operators/compat/sequence_pool.pbtxt
+47
-0
未找到文件。
paddle/fluid/framework/ir/seqpool_cvm_concat_fuse_pass.cc
浏览文件 @
5f198a6e
...
...
@@ -52,6 +52,52 @@ static void GetConcatNodes(ir::Graph* graph, std::vector<Node*>* concat_nodes) {
}
}
// anonymous namespace
SeqPoolCVMConcatFusePass
::
SeqPoolCVMConcatFusePass
()
{
AddOpCompat
(
OpCompat
(
"sequence_pool"
))
.
AddInput
(
"X"
)
.
IsTensor
()
.
End
()
.
AddOutput
(
"Out"
)
.
IsTensor
()
.
End
()
.
AddOutput
(
"MaxIndex"
)
.
IsTensor
()
.
IsOptional
()
.
End
()
.
AddAttr
(
"pooltype"
)
.
IsStringIn
({
"AVERAGE"
,
"SUM"
,
"SQRT"
,
"LAST"
,
"FIRST"
,
"MAX"
})
.
End
()
.
AddAttr
(
"pad_value"
)
.
End
();
AddOpCompat
(
OpCompat
(
"cvm"
))
.
AddInput
(
"X"
)
.
IsTensor
()
.
End
()
.
AddInput
(
"CVM"
)
.
IsTensor
()
.
End
()
.
AddOutput
(
"Y"
)
.
IsTensor
()
.
End
()
.
AddAttr
(
"use_cvm"
)
.
IsBoolEQ
(
true
)
.
End
();
AddOpCompat
(
OpCompat
(
"concat"
))
.
AddInput
(
"X"
)
.
IsTensor
()
.
End
()
.
AddInput
(
"AxisTensor"
)
.
IsTensor
()
.
IsOptional
()
.
End
()
.
AddOutput
(
"Out"
)
.
IsTensor
()
.
End
()
.
AddAttr
(
"axis"
)
.
IsNumGE
(
1
)
.
End
();
}
void
SeqPoolCVMConcatFusePass
::
ApplyImpl
(
ir
::
Graph
*
graph
)
const
{
FusePassBase
::
Init
(
"seqpool_cvm_concat_fuse"
,
graph
);
std
::
vector
<
Node
*>
concat_nodes
;
...
...
paddle/fluid/framework/ir/seqpool_cvm_concat_fuse_pass.h
浏览文件 @
5f198a6e
...
...
@@ -44,7 +44,7 @@ class Graph;
class
SeqPoolCVMConcatFusePass
:
public
FusePassBase
{
public:
virtual
~
SeqPoolCVMConcatFusePass
()
{}
SeqPoolCVMConcatFusePass
();
protected:
void
ApplyImpl
(
ir
::
Graph
*
graph
)
const
override
;
...
...
paddle/fluid/operators/compat/cvm.pbtxt
0 → 100644
浏览文件 @
5f198a6e
type: "cvm"
def {
inputs {
name: "X"
}
inputs {
name: "CVM"
}
outputs {
name: "Y"
}
attrs {
name: "use_cvm"
type: BOOLEAN
}
}
extra {
attrs {
name: "op_role"
type: INT
}
attrs {
name: "op_role_var"
type: STRINGS
}
attrs {
name: "op_namescope"
type: STRING
}
attrs {
name: "op_callstack"
type: STRINGS
}
attrs {
name: "op_device"
type: STRING
}
}
paddle/fluid/operators/compat/sequence_pool.pbtxt
0 → 100644
浏览文件 @
5f198a6e
type: "sequence_pool"
def {
inputs {
name: "X"
}
outputs {
name: "Out"
}
outputs {
name: "MaxIndex"
}
attrs {
name: "pooltype"
type: STRING
}
attrs {
name: "pad_value"
type: FLOAT
}
}
extra {
attrs {
name: "is_test"
type: BOOLEAN
}
attrs {
name: "op_role"
type: INT
}
attrs {
name: "op_role_var"
type: STRINGS
}
attrs {
name: "op_namescope"
type: STRING
}
attrs {
name: "op_callstack"
type: STRINGS
}
attrs {
name: "op_device"
type: STRING
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录