未验证 提交 64b61fc4 编写于 作者: H HongyuJia 提交者: GitHub

delete GetExpectedKernelType mkldnn of transpose2 (#46977)

上级 eded6013
......@@ -231,14 +231,6 @@ class Transpose2Op : public TransposeOp {
const framework::ExecutionContext &ctx) const override {
framework::proto::VarType::Type data_type =
OperatorWithKernel::IndicateVarDataType(ctx, "X");
#ifdef PADDLE_WITH_MKLDNN
if (this->CanMKLDNNBeUsed(ctx, data_type)) {
return framework::OpKernelType(data_type,
ctx.GetPlace(),
framework::DataLayout::kMKLDNN,
framework::LibraryType::kMKLDNN);
}
#endif
std::string data_format = ctx.Attr<std::string>("data_format");
framework::DataLayout layout_ = framework::StringToDataLayout(data_format);
return framework::OpKernelType(data_type, ctx.GetPlace(), layout_);
......
......@@ -78,8 +78,7 @@ static const std::unordered_set<std::string> mkldnn_white_list = {
"prior_box",
"fc",
"mul",
"mul_grad",
"transpose2"};
"mul_grad"};
inline bool in_mkldnn_white_list(const std::string& op_name) {
return mkldnn_white_list.find(op_name) != mkldnn_white_list.end();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册