From 9c5db11cfebfff87d18252ab2edb3b0bef9207b8 Mon Sep 17 00:00:00 2001 From: Aron Virginas-Tar Date: Thu, 25 Oct 2018 11:10:49 +0100 Subject: IVGCVSW-2058: Remove ARMCOMPUTE(CL/NEON)_ENABLED and ARMCOMPUTENEON_ENABLED from src/armnnUtils/ParserPrototxtFixture.hpp Change-Id: Ief836fb80c4c966f1b76c9429d4a7fb644ceb73d --- src/armnnUtils/ParserPrototxtFixture.hpp | 27 +++++++++++++++------------ src/backends/cl/CMakeLists.txt | 32 ++++++++++++++++++++------------ 2 files changed, 35 insertions(+), 24 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 +#include + +#include + +#include + +#include #include + #include 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. diff --git a/src/backends/cl/CMakeLists.txt b/src/backends/cl/CMakeLists.txt index 1f99017cdd..7182332956 100644 --- a/src/backends/cl/CMakeLists.txt +++ b/src/backends/cl/CMakeLists.txt @@ -3,21 +3,18 @@ # SPDX-License-Identifier: MIT # -list(APPEND armnnClBackend_sources - ClBackend.cpp - ClBackend.hpp - ClBackendId.hpp - ClContextControl.cpp - ClContextControl.hpp - ClLayerSupport.cpp - ClLayerSupport.hpp - ClWorkloadFactory.cpp - ClWorkloadFactory.hpp -) - if(ARMCOMPUTECL) list(APPEND armnnClBackend_sources + ClBackend.cpp + ClBackend.hpp ClBackendId.hpp + ClContextControl.cpp + ClContextControl.hpp + ClLayerSupport.cpp + ClLayerSupport.hpp + ClTensorHandle.hpp + ClWorkloadFactory.cpp + ClWorkloadFactory.hpp OpenClTimer.cpp OpenClTimer.hpp ) @@ -27,6 +24,17 @@ if(ARMCOMPUTECL) if(BUILD_UNIT_TESTS) add_subdirectory(test) endif() + +else() + list(APPEND armnnClBackend_sources + ClBackendId.hpp + ClContextControl.cpp + ClContextControl.hpp + ClLayerSupport.cpp + ClLayerSupport.hpp + ClWorkloadFactory.cpp + ClWorkloadFactory.hpp + ) endif() add_library(armnnClBackend OBJECT ${armnnClBackend_sources}) -- cgit v1.2.1