IVGCVSW-7420 Prevent CpuAcc & GpuAcc from running during support library aync execution

Signed-off-by: Cathal Corbett <cathal.corbett@arm.com>
Change-Id: I6f921feaf591f0a1e27c373bb708c7ec8dfcbe43
diff --git a/include/armnn/ArmNN.hpp b/include/armnn/ArmNN.hpp
index e4d5ce1..ec79941 100644
--- a/include/armnn/ArmNN.hpp
+++ b/include/armnn/ArmNN.hpp
@@ -5,6 +5,7 @@
 #pragma once
 
 #include "BackendId.hpp"
+#include "BackendHelper.hpp"
 #include "Descriptors.hpp"
 #include "Exceptions.hpp"
 #include "INetwork.hpp"
diff --git a/shim/sl/canonical/ArmnnDevice.cpp b/shim/sl/canonical/ArmnnDevice.cpp
index 0017973..71135cb 100644
--- a/shim/sl/canonical/ArmnnDevice.cpp
+++ b/shim/sl/canonical/ArmnnDevice.cpp
@@ -1,5 +1,5 @@
 //
-// Copyright © 2022 Arm Ltd and Contributors. All rights reserved.
+// Copyright © 2022-2023 Arm Ltd and Contributors. All rights reserved.
 // SPDX-License-Identifier: MIT
 //
 
@@ -124,7 +124,16 @@
             }
             else
             {
-                backends.push_back(backend);
+                if (m_Options.isAsyncModelExecutionEnabled() &&
+                    armnn::HasCapability(armnn::BackendOptions::BackendOption{"AsyncExecution", false}, backend))
+                {
+                    VLOG(DRIVER) << "ArmnnDevice: ArmNN does not support AsyncExecution with the following backend: "
+                                 << backend.Get().c_str();
+                }
+                else
+                {
+                    backends.push_back(backend);
+                }
             }
         }
     }