aboutsummaryrefslogtreecommitdiff
path: root/delegate/src
diff options
context:
space:
mode:
Diffstat (limited to 'delegate/src')
-rw-r--r--delegate/src/armnn_delegate.cpp14
-rw-r--r--delegate/src/test/DelegateOptionsTest.cpp2
2 files changed, 11 insertions, 5 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,
diff --git a/delegate/src/test/DelegateOptionsTest.cpp b/delegate/src/test/DelegateOptionsTest.cpp
index 126bf30a25..c9f1530968 100644
--- a/delegate/src/test/DelegateOptionsTest.cpp
+++ b/delegate/src/test/DelegateOptionsTest.cpp
@@ -173,7 +173,7 @@ TEST_CASE ("ArmnnDelegateModelOptions_CpuAcc_Test")
});
modelOptions.push_back(cpuAcc);
- armnn::OptimizerOptions optimizerOptions(false, false, false, false, modelOptions);
+ armnn::OptimizerOptions optimizerOptions(false, false, false, false, modelOptions, false);
armnnDelegate::DelegateOptions delegateOptions(backends, optimizerOptions);
DelegateOptionTest<float>(::tflite::TensorType_FLOAT32,