6 #define LOG_TAG "arm-armnn-sl"
10 #include <LegacyUtils.h>
11 #include <OperationsUtils.h>
19 #include <android/log.h>
27 std::stringstream backends;
32 return backends.str();
43 : m_Runtime(nullptr, nullptr)
44 , m_ClTunedParameters(nullptr)
45 , m_Options(
std::move(options))
62 VLOG(DRIVER) <<
"ArmnnDevice::ArmnnDevice()";
65 __android_log_print(ANDROID_LOG_DEBUG,
"ARMNN_SL",
"ArmnnDevice::ArmnnDevice()");
71 SetMinimumLogSeverity(android::base::VERBOSE);
75 SetMinimumLogSeverity(android::base::INFO);
93 catch (std::exception& error)
96 VLOG(DRIVER) <<
"ArmnnDevice: Failed to load CL tuned parameters file "
104 VLOG(DRIVER) <<
"ArmnnDevice: Failed to setup CL runtime: %s. Device will be unavailable." << error.what();
106 catch (std::exception& error)
108 VLOG(DRIVER) <<
"ArmnnDevice: Unknown exception: %s. Device will be unavailable." << error.what();
114 std::vector<armnn::BackendId> backends;
121 if (std::find(supportedDevices.cbegin(), supportedDevices.cend(), backend) == supportedDevices.cend())
123 VLOG(DRIVER) <<
"ArmnnDevice: Requested unknown backend " << backend.Get().c_str();
127 backends.push_back(backend);
132 if (backends.empty())
139 VLOG(DRIVER) <<
"ArmnnDevice: Created device with the following backends: " << GetBackendString(
m_Options).c_str();
142 __android_log_print(ANDROID_LOG_DEBUG,
144 "ArmnnDevice: Created device with the following backends: %s",