aboutsummaryrefslogtreecommitdiff
path: root/src/graph/mutators/DepthConcatSubTensorMutator.cpp
diff options
context:
space:
mode:
authorAnthony Barbier <anthony.barbier@arm.com>2018-08-22 13:44:36 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:54:54 +0000
commit890ad1be4eff1a805fe07667f4044b1d38a07b39 (patch)
tree98d2e9e4ef76d1e015d867dd6945bee3cb7ba5f0 /src/graph/mutators/DepthConcatSubTensorMutator.cpp
parentaaba4c626bcc6365e0108130633ce43fafe9da45 (diff)
downloadComputeLibrary-890ad1be4eff1a805fe07667f4044b1d38a07b39.tar.gz
COMPMID-1246: Fix bug in handling backends that can't be loaded in the Graph API
Change-Id: Iefd175af2f472179d86df5358a1527a79c5666ed Reviewed-on: https://eu-gerrit-1.euhpc.arm.com/145182 Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Tested-by: Jenkins <bsgcomp@arm.com>
Diffstat (limited to 'src/graph/mutators/DepthConcatSubTensorMutator.cpp')
-rw-r--r--src/graph/mutators/DepthConcatSubTensorMutator.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/graph/mutators/DepthConcatSubTensorMutator.cpp b/src/graph/mutators/DepthConcatSubTensorMutator.cpp
index 937528d143..a170c4d899 100644
--- a/src/graph/mutators/DepthConcatSubTensorMutator.cpp
+++ b/src/graph/mutators/DepthConcatSubTensorMutator.cpp
@@ -77,7 +77,7 @@ void DepthConcatSubTensorMutator::mutate(Graph &g)
});
// Create subtensors
- if(is_valid && backends::BackendRegistry::get().find_backend(output_tensor->desc().target) != nullptr)
+ if(is_valid && is_target_supported(output_tensor->desc().target))
{
ARM_COMPUTE_LOG_GRAPH_VERBOSE("Using sub-tensors for the node with ID : "
<< node->id() << " and name : " << node->name() << std::endl);
@@ -88,8 +88,8 @@ void DepthConcatSubTensorMutator::mutate(Graph &g)
auto input_tensor = node->input(i);
const auto input_shape = input_tensor->desc().shape;
- auto backend = backends::BackendRegistry::get().find_backend(input_tensor->desc().target);
- auto handle = backend->create_subtensor(output_tensor->handle(), input_shape, Coordinates(0, 0, depth), false);
+ backends::IDeviceBackend &backend = backends::BackendRegistry::get().get_backend(input_tensor->desc().target);
+ std::unique_ptr<ITensorHandle> handle = backend.create_subtensor(output_tensor->handle(), input_shape, Coordinates(0, 0, depth), false);
input_tensor->set_handle(std::move(handle));
depth += input_shape.z();