aboutsummaryrefslogtreecommitdiff
path: root/src/armnn
diff options
context:
space:
mode:
authorDavid Monahan <david.monahan@arm.com>2023-11-22 13:24:25 +0000
committerDavid Monahan <david.monahan@arm.com>2023-12-07 15:21:09 +0000
commit8a570466aca7ae1619fe8fa715b68419fceb142f (patch)
tree22d80676e01f4a92fc6d927b6c26d6e5939c5170 /src/armnn
parent748657f2941d28bec810b7eec21e46e288002036 (diff)
downloadarmnn-8a570466aca7ae1619fe8fa715b68419fceb142f.tar.gz
IVGCVSW-8157 - Rebase existing GpuFsa patches to 23.11
Squashed commit of the following: IVGCVSW-7159 Add GpuFsa backend skeleton IVGCVSW-7380 Update the GpuFsa Skeleton to build and load ACL IVGCVSW-7381 Add IsLayerSupported implementation to GpuFsa backend IVGCVSW-7382 Implementation of Conv2d within GpuFsa Signed-off-by: James Conroy <james.conroy@arm.com> Signed-off-by: Matthew Sloyan <matthew.sloyan@arm.com> Signed-off-by: David Monahan <david.monahan@arm.com> Change-Id: Id23d9ee598535de7b38a99ca223cdf0ad2102cef
Diffstat (limited to 'src/armnn')
-rw-r--r--src/armnn/Network.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/armnn/Network.cpp b/src/armnn/Network.cpp
index f18c6bfb48..4f82f20aa2 100644
--- a/src/armnn/Network.cpp
+++ b/src/armnn/Network.cpp
@@ -1906,6 +1906,18 @@ IOptimizedNetworkPtr Optimize(const Graph& inGraph,
ProfilerManager::GetInstance().RegisterProfiler(profiler.get());
profiler->EnableProfiling(options.GetProfilingEnabled());
+ // 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())
{