aboutsummaryrefslogtreecommitdiff
path: root/src/armnn
diff options
context:
space:
mode:
authorCathal Corbett <cathal.corbett@arm.com>2023-01-09 12:47:48 +0000
committerCathal Corbett <cathal.corbett@arm.com>2023-01-12 11:58:50 +0000
commit2b32a69f3aac5496d0a966d9740cb4854504f3d9 (patch)
tree0ffc0710d5dd0feb9aa35be3defc8111d1c035b8 /src/armnn
parentd69c1c595375b904a7f19f562ac1d54098184b4e (diff)
downloadarmnn-2b32a69f3aac5496d0a966d9740cb4854504f3d9.tar.gz
IVGCVSW-7380 Update the GpuFsa Skeleton to build and load ACL
* Reuse cl backend to be able to create ClRuntime, ClContexts etc. for the new GpuFsa backend. * Can access code defined in the experimental interface dynamic_fusion. * No BackendModelContext as model/backend options not required for now. * Any of the serializer and deserializer is emitted as context caching not required. * No ImportTensorHandle and ImportTensorHandleFactory for now. * Moved tuning and IClTensorHandle code to aclCommon as it is accessed by both cl and gpuFsa. * Small code refactor of cl backend. * Added DefaultAllocatorTests to GpuFsa backend. Signed-off-by: Cathal Corbett <cathal.corbett@arm.com> Change-Id: I6ae591360e9d2a783aafd06e2d7bf8e0b3e623ee
Diffstat (limited to 'src/armnn')
-rw-r--r--src/armnn/Network.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/armnn/Network.cpp b/src/armnn/Network.cpp
index 42388bfbd7..cda87e89c2 100644
--- a/src/armnn/Network.cpp
+++ b/src/armnn/Network.cpp
@@ -1,5 +1,5 @@
//
-// Copyright © 2017,2022 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2017,2022-2023 Arm Ltd and Contributors. All rights reserved.
// SPDX-License-Identifier: MIT
//
@@ -1582,6 +1582,18 @@ IOptimizedNetworkPtr Optimize(const Graph& inGraph,
ProfilerManager::GetInstance().RegisterProfiler(profiler.get());
profiler->EnableProfiling(options.m_ProfilingEnabled);
+ // Some backends don't play well together. Check here before continuing.
+ {
+ std::set<BackendId> backendSet(backendPreferences.begin(), backendPreferences.end());
+ // GpuFsa cannot co-exist with GpuAcc.
+ if (backendSet.find("GpuFsa") != backendSet.end() &&
+ backendSet.find("GpuAcc") != backendSet.end())
+ {
+ throw InvalidArgumentException("The backends \"GpuAcc\" and \"GpuFsa\" cannot be specified "
+ "for the same optimized network.");
+ }
+ }
+
ARMNN_SCOPED_PROFILING_EVENT(Compute::Undefined, "Optimizer");
if (backendPreferences.empty())
{