diff options
author | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2020-08-17 17:02:12 +0100 |
---|---|---|
committer | Narumol Prangnawarat <narumol.prangnawarat@arm.com> | 2020-08-17 18:46:28 +0000 |
commit | ef6f300928e54cbe6bbfb9dfeb26c2db56ee5dc9 (patch) | |
tree | 7f9be0980ff5cede5ff8b25fced44f3c5cc0bd70 /tests/TfLiteYoloV3Big-Armnn/TfLiteYoloV3Big-Armnn.cpp | |
parent | 35c31c04a9805082be32474211dcd62b7629ed2b (diff) | |
download | armnn-ef6f300928e54cbe6bbfb9dfeb26c2db56ee5dc9.tar.gz |
IVGCVSW-5114 Enable memory import in TfLiteYoloV3Big App
* Enable memory import in TfLiteYoloV3Big App
* Add isMemoryManaged flag to Concat and Splitter layers
Signed-off-by: Narumol Prangnawarat <narumol.prangnawarat@arm.com>
Change-Id: I7e00f5da2a016c09d480b744fb17ea5611af8365
Diffstat (limited to 'tests/TfLiteYoloV3Big-Armnn/TfLiteYoloV3Big-Armnn.cpp')
-rw-r--r-- | tests/TfLiteYoloV3Big-Armnn/TfLiteYoloV3Big-Armnn.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/TfLiteYoloV3Big-Armnn/TfLiteYoloV3Big-Armnn.cpp b/tests/TfLiteYoloV3Big-Armnn/TfLiteYoloV3Big-Armnn.cpp index bf3578c37e..fcc21771cc 100644 --- a/tests/TfLiteYoloV3Big-Armnn/TfLiteYoloV3Big-Armnn.cpp +++ b/tests/TfLiteYoloV3Big-Armnn/TfLiteYoloV3Big-Armnn.cpp @@ -101,7 +101,8 @@ int LoadModel(const char* filename, ITfLiteParser& parser, IRuntime& runtime, NetworkId& networkId, - const std::vector<BackendId>& backendPreferences) + const std::vector<BackendId>& backendPreferences, + bool enableImport = false) { std::ifstream stream(filename, std::ios::in | std::ios::binary); if (!stream.is_open()) @@ -125,10 +126,10 @@ int LoadModel(const char* filename, return OPTIMIZE_NETWORK_ERROR; } - // Load backbone model into runtime + // Load model into runtime { std::string errorMessage; - INetworkProperties modelProps; + INetworkProperties modelProps(enableImport, enableImport); Status status = runtime.LoadNetwork(networkId, std::move(optimizedModel), errorMessage, modelProps); if (status != Status::Success) { @@ -346,7 +347,8 @@ int main(int argc, char* argv[]) // Load detector model ARMNN_LOG(info) << "Loading detector..."; NetworkId detectorId; - CHECK_OK(LoadModel(progArgs.detectorDir.c_str(), *parser, *runtime, detectorId, progArgs.prefBackendsDetector)); + CHECK_OK(LoadModel( + progArgs.detectorDir.c_str(), *parser, *runtime, detectorId, progArgs.prefBackendsDetector, true)); auto detectIn0Id = parser->GetNetworkInputBindingInfo(0, "input_to_detector_1"); auto detectIn1Id = parser->GetNetworkInputBindingInfo(0, "input_to_detector_2"); auto detectIn2Id = parser->GetNetworkInputBindingInfo(0, "input_to_detector_3"); |