From 984505720edddde0ae7f9e17ed60853721e17091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tadej=20Ciglari=C4=8D?= Date: Tue, 15 Oct 2024 13:15:14 +0200 Subject: [PATCH] generic: sycl: resampling: fix a bug with post ops and non-max dimensions --- src/gpu/generic/sycl/resampling_kernels.hpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/gpu/generic/sycl/resampling_kernels.hpp b/src/gpu/generic/sycl/resampling_kernels.hpp index 9a8454402d3..256156df45c 100644 --- a/src/gpu/generic/sycl/resampling_kernels.hpp +++ b/src/gpu/generic/sycl/resampling_kernels.hpp @@ -114,6 +114,15 @@ struct resampling_kernel_fwd_vec_t { } dims_t off {mb, c, od, oh, ow}; + if (dst_ndims == 3) { + off[2] = ow; + off[3] = 0; + off[4] = 0; + } else if (dst_ndims == 4) { + off[2] = oh; + off[3] = ow; + off[4] = 0; + } dst = conf_.post_ops.apply(dst, dst_, data_p_off, po_args_, off); dst_mem.store(dst, data_p_off); utils::nd_iterator_step(mb, MB, c, C, od, OD, oh, OH, ow, OW);