From b2b8b15bfea1aeff67234b830182392c660748a8 Mon Sep 17 00:00:00 2001 From: Tomasz Patejko Date: Fri, 13 Jul 2018 11:32:42 +0200 Subject: [PATCH] MKLDNN sum fix: remove in_place condition in loop creating memory primitives for sum --- paddle/fluid/operators/sum_mkldnn_op.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/paddle/fluid/operators/sum_mkldnn_op.cc b/paddle/fluid/operators/sum_mkldnn_op.cc index f78d977760f..d2035777ee2 100644 --- a/paddle/fluid/operators/sum_mkldnn_op.cc +++ b/paddle/fluid/operators/sum_mkldnn_op.cc @@ -88,7 +88,7 @@ class SumMKLDNNOpKernel : public paddle::framework::OpKernel { input_format = memory::format::nc; } - for (int i = in_place ? 1 : 0; i < N; i++) { + for (int i = 0; i < N; i++) { PADDLE_ENFORCE(in_vars[i]->IsType(), "all inputs must be all LoDTensors"); auto& input = in_vars[i]->Get(); -- GitLab