aboutsummaryrefslogtreecommitdiff
path: root/src/armnnUtils/ParserPrototxtFixture.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/armnnUtils/ParserPrototxtFixture.hpp')
-rw-r--r--src/armnnUtils/ParserPrototxtFixture.hpp27
1 files changed, 15 insertions, 12 deletions
diff --git a/src/armnnUtils/ParserPrototxtFixture.hpp b/src/armnnUtils/ParserPrototxtFixture.hpp
index 1adada7a26..2287de515a 100644
--- a/src/armnnUtils/ParserPrototxtFixture.hpp
+++ b/src/armnnUtils/ParserPrototxtFixture.hpp
@@ -5,12 +5,17 @@
#pragma once
-#include "armnn/IRuntime.hpp"
-#include "armnnOnnxParser/IOnnxParser.hpp"
-#include "test/TensorHelpers.hpp"
-#include "VerificationHelpers.hpp"
+#include <armnn/IRuntime.hpp>
+#include <armnn/test/TensorHelpers.hpp>
+
+#include <armnnOnnxParser/IOnnxParser.hpp>
+
+#include <armnnUtils/VerificationHelpers.hpp>
+
+#include <backends/BackendRegistry.hpp>
#include <boost/format.hpp>
+
#include <string>
namespace armnnUtils
@@ -24,15 +29,13 @@ struct ParserPrototxtFixture
, m_NetworkIdentifier(-1)
{
armnn::IRuntime::CreationOptions options;
- m_Runtimes.push_back(std::make_pair(armnn::IRuntime::Create(options), armnn::Compute::CpuRef));
-#if ARMCOMPUTENEON_ENABLED
- m_Runtimes.push_back(std::make_pair(armnn::IRuntime::Create(options), armnn::Compute::CpuAcc));
-#endif
-
-#if ARMCOMPUTECL_ENABLED
- m_Runtimes.push_back(std::make_pair(armnn::IRuntime::Create(options), armnn::Compute::GpuAcc));
-#endif
+ // Create runtimes for each available backend
+ const armnn::BackendIdSet availableBackendIds = armnn::BackendRegistryInstance().GetBackendIds();
+ for (auto& backendId : availableBackendIds)
+ {
+ m_Runtimes.push_back(std::make_pair(armnn::IRuntime::Create(options), backendId));
+ }
}
/// Parses and loads the network defined by the m_Prototext string.