IVGCVSW-4077 Fix issue when NEON import disabled
authorJames Conroy <james.conroy@arm.com>
Mon, 18 Nov 2019 17:07:43 +0000 (17:07 +0000)
committerJames Conroy <james.conroy@arm.com>
Tue, 19 Nov 2019 12:51:55 +0000 (12:51 +0000)
* Removes workaround which handled null dstFactory
  when NEON import was disabled, and now handles
  this in the correct way.

Signed-off-by: James Conroy <james.conroy@arm.com>
Change-Id: Ief42b3c52d018f0fa71be4d4d37516f2caad1e0d

src/armnn/Network.cpp

index 1797baf..d164759 100644 (file)
@@ -708,9 +708,9 @@ EdgeStrategy CalculateEdgeStrategy(BackendsMap& backends,
         {
             ITensorHandleFactory* dstFactory = registry.GetFactory(pref);
 
-            // Handles some cases where dstFactory is null when Neon memory import is disabled
+            // Handles cases when a destPref is not listed in TensorHandleFactoryRegistry
             if (!dstFactory) {
-                return EdgeStrategy::CopyToTarget;
+                continue;
             }
 
             if ((dstFactory->GetImportFlags() & srcFactory->GetExportFlags()) != 0)
@@ -726,7 +726,7 @@ EdgeStrategy CalculateEdgeStrategy(BackendsMap& backends,
         for (auto&& pref : dstPrefs)
         {
             ITensorHandleFactory* dstFactory = registry.GetFactory(pref);
-            if (dstFactory->SupportsMapUnmap())
+            if (dstFactory && dstFactory->SupportsMapUnmap())
             {
                 return EdgeStrategy::CopyToTarget;
             }