From ae7192a82ebed4bfac0d3b9718c01abcb1df0b98 Mon Sep 17 00:00:00 2001 From: jakpiase Date: Thu, 16 Jun 2022 09:12:33 +0200 Subject: [PATCH] fix for quant model (#43567) --- paddle/fluid/operators/mkldnn/fc_mkldnn_op.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/paddle/fluid/operators/mkldnn/fc_mkldnn_op.cc b/paddle/fluid/operators/mkldnn/fc_mkldnn_op.cc index 30db4b3be66..a130db68a58 100644 --- a/paddle/fluid/operators/mkldnn/fc_mkldnn_op.cc +++ b/paddle/fluid/operators/mkldnn/fc_mkldnn_op.cc @@ -178,6 +178,8 @@ class FCPrimitiveFactory { } else { out->set_format(in_format); } + out->set_mem_desc({phi::vectorize(out->dims()), + platform::MKLDNNGetDataType(), out->format()}); } void UpdateDataPointers(const ExecutionContext& ctx, Tensor* out, -- GitLab