Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
a9c20660
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 2 年 前同步成功
通知
2325
Star
20933
Fork
5424
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
a9c20660
编写于
10月 18, 2022
作者:
H
HongyuJia
提交者:
GitHub
10月 18, 2022
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
delete GetExpectedKernelType mkldnn of conv_op (#47044)
上级
7c92177c
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
6 addition
and
37 deletion
+6
-37
paddle/fluid/operators/conv_op.cc
paddle/fluid/operators/conv_op.cc
+6
-31
paddle/fluid/platform/mkldnn_op_list.h
paddle/fluid/platform/mkldnn_op_list.h
+0
-6
未找到文件。
paddle/fluid/operators/conv_op.cc
浏览文件 @
a9c20660
...
@@ -227,15 +227,6 @@ framework::OpKernelType ConvOp::GetExpectedKernelType(
...
@@ -227,15 +227,6 @@ framework::OpKernelType ConvOp::GetExpectedKernelType(
}
}
#endif // PADDLE_WITH_CUDA || PADDLE_WITH_HIP
#endif // PADDLE_WITH_CUDA || PADDLE_WITH_HIP
#ifdef PADDLE_WITH_MKLDNN
if
(
this
->
CanMKLDNNBeUsed
(
ctx
,
input_data_type
))
{
return
framework
::
OpKernelType
(
input_data_type
,
ctx
.
GetPlace
(),
phi
::
DataLayout
::
kMKLDNN
,
framework
::
LibraryType
::
kMKLDNN
);
}
#endif
return
framework
::
OpKernelType
(
input_data_type
,
ctx
.
GetPlace
());
return
framework
::
OpKernelType
(
input_data_type
,
ctx
.
GetPlace
());
}
}
...
@@ -494,14 +485,6 @@ framework::OpKernelType ConvOpGrad::GetExpectedKernelType(
...
@@ -494,14 +485,6 @@ framework::OpKernelType ConvOpGrad::GetExpectedKernelType(
framework
::
LibraryType
::
kCUDNN
);
framework
::
LibraryType
::
kCUDNN
);
}
}
#endif
#endif
#ifdef PADDLE_WITH_MKLDNN
if
(
this
->
CanMKLDNNBeUsed
(
ctx
,
data_type
))
{
return
framework
::
OpKernelType
(
data_type
,
ctx
.
GetPlace
(),
phi
::
DataLayout
::
kMKLDNN
,
framework
::
LibraryType
::
kMKLDNN
);
}
#endif
return
framework
::
OpKernelType
(
data_type
,
ctx
.
GetPlace
());
return
framework
::
OpKernelType
(
data_type
,
ctx
.
GetPlace
());
}
}
...
@@ -673,24 +656,16 @@ void ConvOpDoubleGrad::InferShape(framework::InferShapeContext* ctx) const {
...
@@ -673,24 +656,16 @@ void ConvOpDoubleGrad::InferShape(framework::InferShapeContext* ctx) const {
framework
::
OpKernelType
ConvOpDoubleGrad
::
GetExpectedKernelType
(
framework
::
OpKernelType
ConvOpDoubleGrad
::
GetExpectedKernelType
(
const
framework
::
ExecutionContext
&
ctx
)
const
{
const
framework
::
ExecutionContext
&
ctx
)
const
{
int
customized_type_value
=
auto
data_type
=
OperatorWithKernel
::
IndicateVarDataType
(
ctx
,
"Input"
);
framework
::
OpKernelType
::
kDefaultCustomizedTypeValue
;
framework
::
LibraryType
library_
{
framework
::
LibraryType
::
kPlain
};
std
::
string
data_format
=
"AnyLayout"
;
phi
::
DataLayout
layout_
=
phi
::
StringToDataLayout
(
data_format
);
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)
#if defined(PADDLE_WITH_CUDA) || defined(PADDLE_WITH_HIP)
if
(
platform
::
CanCUDNNBeUsed
(
ctx
))
{
if
(
platform
::
CanCUDNNBeUsed
(
ctx
))
{
library_
=
framework
::
LibraryType
::
kCUDNN
;
return
framework
::
OpKernelType
(
data_type
,
ctx
.
GetPlace
(),
framework
::
DataLayout
::
kAnyLayout
,
framework
::
LibraryType
::
kCUDNN
);
}
}
#endif
#endif
auto
type
=
framework
::
OpKernelType
(
return
framework
::
OpKernelType
(
data_type
,
ctx
.
GetPlace
());
OperatorWithKernel
::
IndicateVarDataType
(
ctx
,
"Input"
),
ctx
.
GetPlace
(),
layout_
,
library_
,
customized_type_value
);
return
type
;
}
}
}
// namespace operators
}
// namespace operators
...
...
paddle/fluid/platform/mkldnn_op_list.h
浏览文件 @
a9c20660
...
@@ -69,12 +69,6 @@ static const std::unordered_set<std::string> mkldnn_white_list = {
...
@@ -69,12 +69,6 @@ static const std::unordered_set<std::string> mkldnn_white_list = {
"reduce_sum_grad"
,
"reduce_sum_grad"
,
// NOTE(jiahongyu): Below ops register kernel with customized_type_value, we
// NOTE(jiahongyu): Below ops register kernel with customized_type_value, we
// need to analysis and solve them one-by-one.
// need to analysis and solve them one-by-one.
"conv2d"
,
"conv2d_grad"
,
"depthwise_conv2d"
,
"depthwise_conv2d_grad"
,
"conv3d"
,
"conv3d_grad"
,
"prior_box"
,
"prior_box"
,
"fc"
,
"fc"
,
"mul"
,
"mul"
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录