diff --git a/paddle/fluid/operators/addmm_op.cc b/paddle/fluid/operators/addmm_op.cc index a2dbd8e2aa269a6010511b050e077721b0acb83a..c87332344256963f974d4ba0284d036879e07757 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()); } };