aboutsummaryrefslogtreecommitdiff
path: root/delegate/src/armnn_delegate.cpp
diff options
context:
space:
mode:
authorFrancis Murtagh <francis.murtagh@arm.com>2022-06-21 13:16:23 +0000
committerFrancis Murtagh <francis.murtagh@arm.com>2022-06-22 08:36:28 +0000
commit626bd90378670eb5fd76f94526395430b752ad9e (patch)
treefa3c41a9ed7506f0bf5eb2b940f8661d2bf47adf /delegate/src/armnn_delegate.cpp
parentb9570c1a5b938aea20964e3b6a8164e9bf096b4c (diff)
downloadarmnn-626bd90378670eb5fd76f94526395430b752ad9e.tar.gz
Revert "Revert "IVGCVSW-6873 Import inputs but don't export outputs fails.""
This reverts commit a0f8b15d4ddb5075f380003ff31b271d389d3b66. Reason for revert: <Test ClDmaBufInternalTests review > Change-Id: Ibc4a77fa008643849da7330391942e4c87b941e2
Diffstat (limited to 'delegate/src/armnn_delegate.cpp')
-rw-r--r--delegate/src/armnn_delegate.cpp14
1 files changed, 10 insertions, 4 deletions
diff --git a/delegate/src/armnn_delegate.cpp b/delegate/src/armnn_delegate.cpp
index bb2f3c319a..1b6d68eb7a 100644
--- a/delegate/src/armnn_delegate.cpp
+++ b/delegate/src/armnn_delegate.cpp
@@ -394,14 +394,20 @@ ArmnnSubgraph* ArmnnSubgraph::Create(TfLiteContext* tfLiteContext,
// Load graph into runtime
std::string errorMessage;
armnn::Status loadingStatus;
- armnn::MemorySource memorySource = armnn::MemorySource::Undefined;
+ armnn::MemorySource inputSource = armnn::MemorySource::Undefined;
+ armnn::MemorySource outputSource = armnn::MemorySource::Undefined;
+ // There's a bit of an assumption here that the delegate will only support Malloc memory source.
if (delegate->m_Options.GetOptimizerOptions().m_ImportEnabled)
{
- memorySource = armnn::MemorySource::Malloc;
+ inputSource = armnn::MemorySource::Malloc;
+ }
+ if (delegate->m_Options.GetOptimizerOptions().m_ExportEnabled)
+ {
+ outputSource = armnn::MemorySource::Malloc;
}
armnn::INetworkProperties networkProperties(false,
- memorySource,
- memorySource,
+ inputSource,
+ outputSource,
delegate->m_Options.GetInternalProfilingState(),
delegate->m_Options.GetInternalProfilingDetail());
loadingStatus = delegate->m_Runtime->LoadNetwork(networkId,