diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/gpu/cl/operators/ClScatter.cpp | 2 | ||||
-rw-r--r-- | src/runtime/CL/functions/CLScatter.cpp | 11 |
2 files changed, 10 insertions, 3 deletions
diff --git a/src/gpu/cl/operators/ClScatter.cpp b/src/gpu/cl/operators/ClScatter.cpp index 74d747bc16..af5fbb86f3 100644 --- a/src/gpu/cl/operators/ClScatter.cpp +++ b/src/gpu/cl/operators/ClScatter.cpp @@ -59,7 +59,7 @@ void ClScatter::configure(const CLCompileContext &compile_context, ITensorInfo *dst, const ScatterInfo &info) { - ARM_COMPUTE_ERROR_ON_NULLPTR(src, indices, dst); + ARM_COMPUTE_ERROR_ON_NULLPTR(updates, indices, dst); ARM_COMPUTE_LOG_PARAMS(src, indices, dst, info); ARM_COMPUTE_UNUSED(src); ARM_COMPUTE_UNUSED(updates); 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}}; } |