Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
urhero
Paddle
提交
05643dc3
P
Paddle
项目概览
urhero
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
0
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看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
05643dc3
编写于
7月 08, 2021
作者:
王
王明冬
提交者:
GitHub
7月 08, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[pass_enhance]add global extra attributes for op def, test=develop (#34009)
上级
80bd093a
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
31 addition
and
525 deletion
+31
-525
paddle/fluid/framework/ir/op_compat_sensible_pass.cc
paddle/fluid/framework/ir/op_compat_sensible_pass.cc
+11
-1
paddle/fluid/operators/compat/affine_channel.pbtxt
paddle/fluid/operators/compat/affine_channel.pbtxt
+0
-22
paddle/fluid/operators/compat/batch_norm.pbtxt
paddle/fluid/operators/compat/batch_norm.pbtxt
+6
-34
paddle/fluid/operators/compat/concat.pbtxt
paddle/fluid/operators/compat/concat.pbtxt
+0
-34
paddle/fluid/operators/compat/conv2d.pbtxt
paddle/fluid/operators/compat/conv2d.pbtxt
+8
-48
paddle/fluid/operators/compat/conv2d_transpose.pbtxt
paddle/fluid/operators/compat/conv2d_transpose.pbtxt
+0
-36
paddle/fluid/operators/compat/conv3d.pbtxt
paddle/fluid/operators/compat/conv3d.pbtxt
+3
-23
paddle/fluid/operators/compat/cvm.pbtxt
paddle/fluid/operators/compat/cvm.pbtxt
+0
-22
paddle/fluid/operators/compat/depthwise_conv2d.pbtxt
paddle/fluid/operators/compat/depthwise_conv2d.pbtxt
+0
-48
paddle/fluid/operators/compat/elementwise_add.pbtxt
paddle/fluid/operators/compat/elementwise_add.pbtxt
+0
-37
paddle/fluid/operators/compat/elementwise_div.pbtxt
paddle/fluid/operators/compat/elementwise_div.pbtxt
+0
-32
paddle/fluid/operators/compat/elementwise_mul.pbtxt
paddle/fluid/operators/compat/elementwise_mul.pbtxt
+0
-32
paddle/fluid/operators/compat/elementwise_pow.pbtxt
paddle/fluid/operators/compat/elementwise_pow.pbtxt
+0
-32
paddle/fluid/operators/compat/elementwise_sub.pbtxt
paddle/fluid/operators/compat/elementwise_sub.pbtxt
+0
-32
paddle/fluid/operators/compat/fake_channel_wise_dequantize_max_abs.pbtxt
...erators/compat/fake_channel_wise_dequantize_max_abs.pbtxt
+0
-27
paddle/fluid/operators/compat/fake_channel_wise_quantize_abs_max.pbtxt
...operators/compat/fake_channel_wise_quantize_abs_max.pbtxt
+0
-26
paddle/fluid/operators/compat/relu.pbtxt
paddle/fluid/operators/compat/relu.pbtxt
+3
-39
未找到文件。
paddle/fluid/framework/ir/op_compat_sensible_pass.cc
浏览文件 @
05643dc3
...
...
@@ -19,6 +19,15 @@ limitations under the License. */
#include "paddle/fluid/framework/op_def_api.h"
#include "paddle/fluid/framework/op_info.h"
namespace
{
std
::
unordered_set
<
std
::
string
>
global_extra_attrs
=
{
"op_role"
,
"op_role_var"
,
"op_namescope"
,
"op_callstack"
,
"op_device"
,
"@ENABLE_CACHE_RUNTIME_CONTEXT@"
,
"is_test"
,
"use_mkldnn"
,
"mkldnn_data_type"
,
"use_quantizer"
,
"mkldnn_data_type"
,
"use_cudnn"
,
"name"
};
}
namespace
paddle
{
namespace
framework
{
namespace
ir
{
...
...
@@ -171,7 +180,8 @@ bool OpCompat::Judge(const OpDesc& op_desc) {
for
(
auto
&
attr_map
:
op_desc
.
GetAttrMap
())
{
if
(
attr_compats_
.
find
(
attr_map
.
first
)
==
attr_compats_
.
end
())
{
if
(
extra_attrs_
.
find
(
attr_map
.
first
)
!=
extra_attrs_
.
end
())
{
if
(
global_extra_attrs
.
find
(
attr_map
.
first
)
!=
global_extra_attrs
.
end
()
||
extra_attrs_
.
find
(
attr_map
.
first
)
!=
extra_attrs_
.
end
())
{
continue
;
}
if
(
!
AttrCompat
(
attr_map
.
first
,
this
).
IsLeftDefault
()(
op_desc
))
{
...
...
paddle/fluid/operators/compat/affine_channel.pbtxt
浏览文件 @
05643dc3
...
...
@@ -17,25 +17,3 @@ def {
name: "Out"
}
}
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/batch_norm.pbtxt
浏览文件 @
05643dc3
...
...
@@ -15,6 +15,9 @@ def {
inputs {
name: "Variance"
}
inputs {
name: "MomentumTensor"
}
outputs {
name: "Y"
}
...
...
@@ -39,29 +42,18 @@ def {
}
}
extra {
inputs {
name: "MomentumTensor"
}
attrs {
name: "@ENABLE_CACHE_RUNTIME_CONTEXT@"
type: BOOLEAN
}
attrs {
name: "
is_test
"
type:
BOOLEAN
name: "
momentum
"
type:
FLOAT
}
attrs {
name: "
momentum
"
name: "
Y0_threshold
"
type: FLOAT
}
attrs {
name: "data_layout"
type: STRING
}
attrs {
name: "use_mkldnn"
type: BOOLEAN
}
attrs {
name: "fuse_with_relu"
type: BOOLEAN
...
...
@@ -74,25 +66,5 @@ extra {
name: "trainable_statistics"
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
}
}
paddle/fluid/operators/compat/concat.pbtxt
浏览文件 @
05643dc3
...
...
@@ -14,37 +14,3 @@ def {
type: INT
}
}
extra {
attrs {
name: "use_mkldnn"
type: BOOLEAN
}
attrs {
name: "use_quantizer"
type: BOOLEAN
}
attrs {
name: "mkldnn_data_type"
type: STRING
}
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/conv2d.pbtxt
浏览文件 @
05643dc3
...
...
@@ -45,6 +45,14 @@ extra {
name: "Input_scale"
type: FLOAT
}
attrs {
name: "Input0_threshold"
type: FLOAT
}
attrs {
name: "weight_scale"
type: FLOAT
}
attrs {
name: "quantization_type"
type: STRING
...
...
@@ -57,42 +65,14 @@ extra {
name: "out_threshold"
type: FLOAT
}
attrs {
name: "@ENABLE_CACHE_RUNTIME_CONTEXT@"
type: BOOLEAN
}
attrs {
name: "skip_quant"
type: BOOLEAN
}
attrs {
name: "is_test"
type: BOOLEAN
}
attrs {
name: "name"
type: STRING
}
attrs {
name: "use_cudnn"
type: BOOLEAN
}
attrs {
name: "fuse_relu_before_depthwise_conv"
type: BOOLEAN
}
attrs {
name: "use_mkldnn"
type: BOOLEAN
}
attrs {
name: "use_quantizer"
type: BOOLEAN
}
attrs {
name: "mkldnn_data_type"
type: STRING
}
attrs {
name: "fuse_relu"
type: BOOLEAN
...
...
@@ -153,25 +133,5 @@ extra {
name: "exhaustive_search"
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
}
}
paddle/fluid/operators/compat/conv2d_transpose.pbtxt
浏览文件 @
05643dc3
...
...
@@ -46,26 +46,10 @@ def {
}
}
extra {
attrs {
name: "is_test"
type: BOOLEAN
}
attrs {
name: "use_cudnn"
type: BOOLEAN
}
attrs {
name: "use_mkldnn"
type: BOOLEAN
}
attrs {
name: "force_fp32_output"
type: BOOLEAN
}
attrs {
name: "mkldnn_data_type"
type: STRING
}
attrs {
name: "fuse_relu"
type: BOOLEAN
...
...
@@ -86,25 +70,5 @@ extra {
name: "workspace_size_MB"
type: INT
}
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/conv3d.pbtxt
浏览文件 @
05643dc3
...
...
@@ -6,6 +6,9 @@ def {
inputs {
name: "Filter"
}
inputs {
name: "ResidualData"
}
outputs {
name: "Output"
}
...
...
@@ -35,33 +38,10 @@ def {
}
}
extra {
inputs {
name: "ResidualData"
}
attrs {
name: "is_test"
type: BOOLEAN
}
attrs {
name: "use_cudnn"
type: BOOLEAN
}
attrs {
name: "fuse_relu_before_depthwise_conv"
type: BOOLEAN
}
attrs {
name: "use_mkldnn"
type: BOOLEAN
}
attrs {
name: "use_quantizer"
type: BOOLEAN
}
attrs {
name: "mkldnn_data_type"
type: STRING
}
attrs {
name: "fuse_relu"
type: BOOLEAN
...
...
paddle/fluid/operators/compat/cvm.pbtxt
浏览文件 @
05643dc3
...
...
@@ -14,26 +14,4 @@ def {
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/depthwise_conv2d.pbtxt
浏览文件 @
05643dc3
...
...
@@ -57,42 +57,14 @@ extra {
name: "out_threshold"
type: FLOAT
}
attrs {
name: "@ENABLE_CACHE_RUNTIME_CONTEXT@"
type: BOOLEAN
}
attrs {
name: "skip_quant"
type: BOOLEAN
}
attrs {
name: "is_test"
type: BOOLEAN
}
attrs {
name: "name"
type: STRING
}
attrs {
name: "use_cudnn"
type: BOOLEAN
}
attrs {
name: "fuse_relu_before_depthwise_conv"
type: BOOLEAN
}
attrs {
name: "use_mkldnn"
type: BOOLEAN
}
attrs {
name: "use_quantizer"
type: BOOLEAN
}
attrs {
name: "mkldnn_data_type"
type: STRING
}
attrs {
name: "fuse_relu"
type: BOOLEAN
...
...
@@ -153,25 +125,5 @@ extra {
name: "exhaustive_search"
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
}
}
paddle/fluid/operators/compat/elementwise_add.pbtxt
浏览文件 @
05643dc3
...
...
@@ -15,10 +15,6 @@ def {
}
}
extra {
attrs {
name: "@ENABLE_CACHE_RUNTIME_CONTEXT@"
type: BOOLEAN
}
attrs {
name: "out_threshold"
type: FLOAT
...
...
@@ -37,19 +33,6 @@ extra {
type: STRING
# no longer to use
}
attrs {
name: "use_quantizer"
type: BOOLEAN
# no longer to use, Use 'mkldnn_data_type' instead.
}
attrs {
name: "use_mkldnn"
type: BOOLEAN
}
attrs {
name: "mkldnn_data_type"
type: STRING
}
attrs {
name: "Scale_x"
type: FLOAT
...
...
@@ -62,24 +45,4 @@ extra {
name: "Scale_out"
type: FLOAT
}
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/elementwise_div.pbtxt
浏览文件 @
05643dc3
...
...
@@ -15,10 +15,6 @@ def {
}
}
extra {
attrs {
name: "use_mkldnn"
type: BOOLEAN
}
attrs {
name: "x_data_format"
type: STRING
...
...
@@ -27,14 +23,6 @@ extra {
name: "y_data_format"
type: STRING
}
attrs {
name: "use_quantizer"
type: BOOLEAN
}
attrs {
name: "mkldnn_data_type"
type: STRING
}
attrs {
name: "Scale_x"
type: FLOAT
...
...
@@ -47,26 +35,6 @@ extra {
name: "Scale_out"
type: FLOAT
}
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
}
attrs {
name: "act"
type: STRING
...
...
paddle/fluid/operators/compat/elementwise_mul.pbtxt
浏览文件 @
05643dc3
...
...
@@ -15,10 +15,6 @@ def {
}
}
extra {
attrs {
name: "use_mkldnn"
type: BOOLEAN
}
attrs {
name: "x_data_format"
type: STRING
...
...
@@ -27,14 +23,6 @@ extra {
name: "y_data_format"
type: STRING
}
attrs {
name: "use_quantizer"
type: BOOLEAN
}
attrs {
name: "mkldnn_data_type"
type: STRING
}
attrs {
name: "Scale_x"
type: FLOAT
...
...
@@ -47,24 +35,4 @@ extra {
name: "Scale_out"
type: FLOAT
}
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/elementwise_pow.pbtxt
浏览文件 @
05643dc3
...
...
@@ -15,10 +15,6 @@ def {
}
}
extra {
attrs {
name: "use_mkldnn"
type: BOOLEAN
}
attrs {
name: "x_data_format"
type: STRING
...
...
@@ -27,14 +23,6 @@ extra {
name: "y_data_format"
type: STRING
}
attrs {
name: "use_quantizer"
type: BOOLEAN
}
attrs {
name: "mkldnn_data_type"
type: STRING
}
attrs {
name: "Scale_x"
type: FLOAT
...
...
@@ -47,26 +35,6 @@ extra {
name: "Scale_out"
type: FLOAT
}
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
}
attrs {
name: "act"
type: STRING
...
...
paddle/fluid/operators/compat/elementwise_sub.pbtxt
浏览文件 @
05643dc3
...
...
@@ -15,10 +15,6 @@ def {
}
}
extra {
attrs {
name: "use_mkldnn"
type: BOOLEAN
}
attrs {
name: "x_data_format"
type: STRING
...
...
@@ -27,14 +23,6 @@ extra {
name: "y_data_format"
type: STRING
}
attrs {
name: "use_quantizer"
type: BOOLEAN
}
attrs {
name: "mkldnn_data_type"
type: STRING
}
attrs {
name: "Scale_x"
type: FLOAT
...
...
@@ -47,26 +35,6 @@ extra {
name: "Scale_out"
type: FLOAT
}
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
}
attrs {
name: "act"
type: STRING
...
...
paddle/fluid/operators/compat/fake_channel_wise_dequantize_max_abs.pbtxt
浏览文件 @
05643dc3
...
...
@@ -18,30 +18,3 @@ def {
type: INT
}
}
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
}
}
paddle/fluid/operators/compat/fake_channel_wise_quantize_abs_max.pbtxt
浏览文件 @
05643dc3
...
...
@@ -18,29 +18,3 @@ def {
type: INT
}
}
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
}
}
paddle/fluid/operators/compat/relu.pbtxt
浏览文件 @
05643dc3
...
...
@@ -8,9 +8,9 @@ def {
}
}
extra {
attrs {
name: "
@ENABLE_CACHE_RUNTIME_CONTEXT@
"
type:
BOOLEAN
attrs {
name: "
X0_threshold
"
type:
FLOAT
}
attrs {
name: "X0_threshold"
...
...
@@ -24,40 +24,4 @@ extra {
name: "Out0_threshold"
type: FLOAT
}
attrs {
name: "use_mkldnn"
type: BOOLEAN
}
attrs {
name: "use_cudnn"
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
}
attrs {
name: "is_test"
type: BOOLEAN
}
attrs {
name: "name"
type: STRINGS
}
}
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录