未验证 提交 690767ed 编写于 作者: X Xinyu Chen 提交者: GitHub

[oneDNN]disable interpolate operators by default (#52462)

上级 ae10133a
......@@ -69,8 +69,24 @@ inline bool FoundPhiOneDNNKernelWithCorrectDataType(
bool MKLDNNPlacementPass::IsSupport(const Node* op) const {
if (FoundOneDNNKernelWithCorrectDataType(op) ||
FoundPhiOneDNNKernelWithCorrectDataType(op))
return true;
FoundPhiOneDNNKernelWithCorrectDataType(op)) {
// For interpolate ops, there's a little difference between Paddle and
// DNNL.
// If run DNNL interpolate ops, manual set AnalysisConfig and apply
// the corresponding pass.
const std::vector<std::string> not_default_op_types = {"bilinear_interp",
"nearest_interp",
"trilinear_interp",
"bicubic_interp",
"linear_interp",
"bilinear_interp_v2",
"linear_interp_v2"};
bool is_interpolate_op =
std::find(not_default_op_types.begin(),
not_default_op_types.end(),
op->Op()->Type()) != not_default_op_types.end();
return !is_interpolate_op;
}
return false;
}
......
......@@ -363,7 +363,6 @@ void CpuPassStrategy::EnableMKLDNN() {
"conv_transpose_eltwiseadd_bn_fuse_pass", //
"conv_bias_mkldnn_fuse_pass", //
"conv_transpose_bias_mkldnn_fuse_pass",
"interpolate_mkldnn_pass",
// TODO(baoachun): Need to support 5-dimensional input.
// "conv3d_bias_mkldnn_fuse_pass", //
"conv_elementwise_add_mkldnn_fuse_pass",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册