aboutsummaryrefslogtreecommitdiff
path: root/src/armnn
diff options
context:
space:
mode:
Diffstat (limited to 'src/armnn')
-rw-r--r--src/armnn/AsyncNetwork.cpp13
-rw-r--r--src/armnn/test/OptimizerTests.cpp3
2 files changed, 16 insertions, 0 deletions
diff --git a/src/armnn/AsyncNetwork.cpp b/src/armnn/AsyncNetwork.cpp
index 4e3838bb5d..230346a0c3 100644
--- a/src/armnn/AsyncNetwork.cpp
+++ b/src/armnn/AsyncNetwork.cpp
@@ -8,6 +8,7 @@
#include "Layer.hpp"
#include "Profiling.hpp"
+#include <armnn/BackendHelper.hpp>
#include <armnn/BackendRegistry.hpp>
#include <armnn/Logging.hpp>
#include <armnn/utility/Assert.hpp>
@@ -391,6 +392,18 @@ AsyncNetworkImpl::AsyncNetworkImpl(std::unique_ptr<IOptimizedNetwork> net,
}
}
+ // Check backends support BackendCapability::AsyncExecution
+ for (auto const& backend : m_Backends)
+ {
+ if (!IsCapabilitySupported(backend.first, BackendCapability::AsyncExecution))
+ {
+ ARMNN_LOG(warning) << fmt::format("AsyncNetworkImpl() Backend: '{0}' does not support Async Execution. "
+ "Will fall back to default implementation.",
+ backend.first.Get());
+ }
+
+ }
+
profiling::ProfilingGuid networkGuid = m_OptimizedNetwork->GetGuid();
std::unique_ptr<profiling::TimelineUtilityMethods> timelineUtils =
profiling::TimelineUtilityMethods::GetTimelineUtils(m_ProfilingService);
diff --git a/src/armnn/test/OptimizerTests.cpp b/src/armnn/test/OptimizerTests.cpp
index 896fdfd68c..95255c3a21 100644
--- a/src/armnn/test/OptimizerTests.cpp
+++ b/src/armnn/test/OptimizerTests.cpp
@@ -685,6 +685,9 @@ BOOST_AUTO_TEST_CASE(BackendCapabilityTest)
BackendId backendId ="MockBackend";
// MockBackend does not support the NonConstWeights capability
BOOST_CHECK(!armnn::IsCapabilitySupported(backendId, armnn::BackendCapability::NonConstWeights));
+
+ // MockBackend does not support the AsyncExecution capability
+ BOOST_CHECK(!armnn::IsCapabilitySupported(backendId, armnn::BackendCapability::AsyncExecution));
}
BOOST_AUTO_TEST_CASE(BackendHintTest)