From bb2463154fb93719debb0b11359418749e281b1a Mon Sep 17 00:00:00 2001 From: Svetlozar Georgiev Date: Mon, 23 Sep 2024 10:35:36 +0100 Subject: [PATCH] generic: sycl: fix sum with many inputs --- src/gpu/generic/sycl/ref_sum_many_inputs.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/gpu/generic/sycl/ref_sum_many_inputs.cpp b/src/gpu/generic/sycl/ref_sum_many_inputs.cpp index 0ef2e41cf5c..8f5b95f42b9 100644 --- a/src/gpu/generic/sycl/ref_sum_many_inputs.cpp +++ b/src/gpu/generic/sycl/ref_sum_many_inputs.cpp @@ -62,12 +62,13 @@ status_t ref_sum_many_inputs_t::execute(const exec_ctx_t &ctx) const { r_args[DNNL_ARG_MULTIPLE_SRC + j + pass_in_dst] = ctx.args().at(DNNL_ARG_MULTIPLE_SRC + j + in_arg_offset); } - n_remaining -= args_handled; - in_arg_offset += args_handled; - i++; exec_ctx_t r_ctx(ctx, std::move(r_args)); CHECK(base_prims_[i]->execute(r_ctx)); + + n_remaining -= args_handled; + in_arg_offset += args_handled; + i++; } return status::success; }