From 473b8291a7dc126586d19b82d6c84b4c7a6e44a6 Mon Sep 17 00:00:00 2001 From: Mohammed Suhail Munshi Date: Mon, 18 Mar 2024 12:13:30 +0000 Subject: Adds Tests and reference implementation for scatter operator with 1D tensors. Resolves: [COMPMID-6890] Change-Id: Ie4a8db24fc6387afa9ddf42b3607e040cdf8df67 Signed-off-by: Mohammed Suhail Munshi Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/11339 Reviewed-by: Gunes Bayir Tested-by: Arm Jenkins Comments-Addressed: Arm Jenkins Benchmark: Arm Jenkins --- src/runtime/CL/functions/CLScatter.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/runtime/CL') diff --git a/src/runtime/CL/functions/CLScatter.cpp b/src/runtime/CL/functions/CLScatter.cpp index e1de92968a..e16fcc4ccc 100644 --- a/src/runtime/CL/functions/CLScatter.cpp +++ b/src/runtime/CL/functions/CLScatter.cpp @@ -62,10 +62,17 @@ void CLScatter::configure(const CLCompileContext &compile_context, ICLTensor *output, const ScatterInfo &info) { - ARM_COMPUTE_ERROR_ON_NULLPTR(src, indices, output); + ARM_COMPUTE_ERROR_ON_NULLPTR(updates, indices, output); _impl->op = std::make_unique(); - _impl->op->configure(compile_context, src->info(), updates->info(), indices->info(), output->info(), info); + if (src) + { // Src not nullptr. + _impl->op->configure(compile_context, src->info(), updates->info(), indices->info(), output->info(), info); + } + else + { + _impl->op->configure(compile_context, nullptr, updates->info(), indices->info(), output->info(), info); + } _impl->run_pack = {{ACL_SRC_0, src}, {ACL_SRC_1, updates}, {ACL_SRC_2, indices}, {ACL_DST, output}}; } -- cgit v1.2.1