From 23d9e947be1e274291a54f3b13980fe252144a6b Mon Sep 17 00:00:00 2001 From: Sylwester Fraczek Date: Mon, 20 Dec 2021 08:29:39 +0100 Subject: [PATCH] fix use of implicitly deleted constructor (#38225) --- paddle/fluid/operators/mkldnn/matmul_mkldnn_op.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/paddle/fluid/operators/mkldnn/matmul_mkldnn_op.cc b/paddle/fluid/operators/mkldnn/matmul_mkldnn_op.cc index ac35c6f5a77..d7353d2def7 100644 --- a/paddle/fluid/operators/mkldnn/matmul_mkldnn_op.cc +++ b/paddle/fluid/operators/mkldnn/matmul_mkldnn_op.cc @@ -151,8 +151,7 @@ class MatMulMKLDNNHandler MatMulMKLDNNHandler(const dnnl::engine engine, const ExecutionContext& ctx, float scale) : paddle::platform::MKLDNNHandlerNoCachingT( - engine, ctx.GetPlace()), - matmul_dims_(GetMatmulDims(ctx)) { + engine, ctx.GetPlace()) { dnnl::primitive_attr attr; float scale_out = ComputeOutputScale(ctx); if (scale_out != 1.0f) { @@ -160,6 +159,7 @@ class MatMulMKLDNNHandler attr.set_output_scales(tensor_wide_scale, {scale_out}); } + auto matmul_dims_ = GetMatmulDims(ctx); auto x_md = memory::desc(matmul_dims_.x_dims, MKLDNNGetDataType(), matmul_dims_.x_strides); auto y_md = memory::desc(matmul_dims_.y_dims, MKLDNNGetDataType(), @@ -419,7 +419,6 @@ class MatMulMKLDNNHandler } private: - MatMulDims matmul_dims_; uint32_t x_offset_; uint32_t y_offset_; uint32_t out_offset_; -- GitLab