diff options
author | Mohammed Suhail Munshi <MohammedSuhail.Munshi@arm.com> | 2024-03-18 12:13:30 +0000 |
---|---|---|
committer | Suhail M <MohammedSuhail.Munshi@arm.com> | 2024-03-25 13:23:33 +0000 |
commit | 473b8291a7dc126586d19b82d6c84b4c7a6e44a6 (patch) | |
tree | 1ca111dfac74ddfb1d8430b6503ba7e6402e9c5d /src/runtime/CL | |
parent | 4908981a4db9da7ec51fd0c2900a25bd91b2926a (diff) | |
download | ComputeLibrary-473b8291a7dc126586d19b82d6c84b4c7a6e44a6.tar.gz |
Adds Tests and reference implementation for scatter operator with 1D tensors.
Resolves: [COMPMID-6890]
Change-Id: Ie4a8db24fc6387afa9ddf42b3607e040cdf8df67
Signed-off-by: Mohammed Suhail Munshi <MohammedSuhail.Munshi@arm.com>
Reviewed-on: https://review.mlplatform.org/c/ml/ComputeLibrary/+/11339
Reviewed-by: Gunes Bayir <gunes.bayir@arm.com>
Tested-by: Arm Jenkins <bsgcomp@arm.com>
Comments-Addressed: Arm Jenkins <bsgcomp@arm.com>
Benchmark: Arm Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/runtime/CL')
-rw-r--r-- | src/runtime/CL/functions/CLScatter.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
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<OperatorType>(); - _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}}; } |