From 9900ed5278cd2e3190cc9697bbde30f1b2179cf9 Mon Sep 17 00:00:00 2001 From: HongyuJia Date: Fri, 30 Sep 2022 16:54:56 +0800 Subject: [PATCH] remove MKLDNN hard code in addmm (#46660) --- paddle/fluid/operators/addmm_op.cc | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/paddle/fluid/operators/addmm_op.cc b/paddle/fluid/operators/addmm_op.cc index a2dbd8e2aa2..c8733234425 100644 --- a/paddle/fluid/operators/addmm_op.cc +++ b/paddle/fluid/operators/addmm_op.cc @@ -21,15 +21,10 @@ limitations under the License. */ #include "paddle/fluid/framework/op_registry.h" #include "paddle/phi/core/infermeta_utils.h" #include "paddle/phi/infermeta/ternary.h" -#ifdef PADDLE_WITH_MKLDNN -#include "paddle/fluid/platform/mkldnn_helper.h" -#endif namespace paddle { namespace operators { -constexpr int kMULMKLDNNINT8 = 1; - using framework::OpKernelType; class AddMMOp : public framework::OperatorWithKernel { @@ -39,21 +34,6 @@ class AddMMOp : public framework::OperatorWithKernel { framework::OpKernelType GetExpectedKernelType( const framework::ExecutionContext& ctx) const { auto input_data_type = OperatorWithKernel::IndicateVarDataType(ctx, "X"); -#ifdef PADDLE_WITH_MKLDNN - if (this->CanMKLDNNBeUsed(ctx, input_data_type)) { - int customized_type_value = - framework::OpKernelType::kDefaultCustomizedTypeValue; - if (input_data_type == framework::DataTypeTrait::DataType() || - input_data_type == framework::DataTypeTrait::DataType()) { - customized_type_value = kMULMKLDNNINT8; - } - return framework::OpKernelType(input_data_type, - ctx.GetPlace(), - framework::DataLayout::kMKLDNN, - framework::LibraryType::kMKLDNN, - customized_type_value); - } -#endif return framework::OpKernelType(input_data_type, ctx.GetPlace()); } }; -- GitLab