From 856d1c9c9b0b1609282c4f797cbafefc6531240d Mon Sep 17 00:00:00 2001 From: Narumol Prangnawarat Date: Fri, 3 May 2019 16:42:52 +0100 Subject: IVGCVSW-3014 Check supported backends from runtime divice spec !armnn:1070 Signed-off-by: Narumol Prangnawarat Change-Id: If0f411f2232e856ebc4f1a4c10fa626e3277a6ab --- DriverOptions.cpp | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'DriverOptions.cpp') diff --git a/DriverOptions.cpp b/DriverOptions.cpp index 6615e519..94fd5942 100644 --- a/DriverOptions.cpp +++ b/DriverOptions.cpp @@ -66,7 +66,7 @@ DriverOptions::DriverOptions(int argc, char** argv) ("compute,c", po::value>()-> multitoken()->default_value(std::vector{"GpuAcc"}, "{GpuAcc}"), - "Which backend to run layers on. Possible values are: CpuRef, CpuAcc, GpuAcc") + "Which backend to run layers on. Examples of possible values are: CpuRef, CpuAcc, GpuAcc") ("verbose-logging,v", po::bool_switch(&m_VerboseLogging), @@ -120,25 +120,10 @@ DriverOptions::DriverOptions(int argc, char** argv) } const std::vector backends = variablesMap["compute"].as>(); - const std::vector supportedDevices({"CpuRef", "CpuAcc", "GpuAcc"}); m_Backends.reserve(backends.size()); - for (auto&& backend : backends) { - if (std::find(supportedDevices.cbegin(), supportedDevices.cend(), backend) == supportedDevices.cend()) - { - ALOGW("Requested unknown backend %s", backend.c_str()); - } - else - { m_Backends.emplace_back(backend); - } - } - - if (m_Backends.empty()) - { - m_Backends.emplace_back("GpuAcc"); - ALOGW("No known backend specified. Defaulting to: GpuAcc"); } if (!unsupportedOperationsAsString.empty()) -- cgit v1.2.1