diff --git a/paddle/fluid/operators/mkldnn/mul_mkldnn_op.cc b/paddle/fluid/operators/mkldnn/mul_mkldnn_op.cc index 71b9cc19398663048a59a4dfd2e2b04e1cae10b9..404f9f74d15c9177f5818702e94dd3e076f32444 100644 --- a/paddle/fluid/operators/mkldnn/mul_mkldnn_op.cc +++ b/paddle/fluid/operators/mkldnn/mul_mkldnn_op.cc @@ -84,7 +84,7 @@ class MulPrimitiveFactory { if ((data->dims().size() == 4 && src_fmt != (dst_fmt = memory::format::nchw)) || (data->dims().size() == 5 && - dst_fmt != (dst_fmt = memory::format::ncdhw))) { + src_fmt != (dst_fmt = memory::format::ncdhw))) { auto dst_mdesc = CreateMemDescriptor(data, dst_fmt); x_tmp.mutable_data(ctx.GetPlace(), data->memory_size());