aboutsummaryrefslogtreecommitdiff
path: root/shim/sl/canonical/ArmnnDevice.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'shim/sl/canonical/ArmnnDevice.cpp')
-rw-r--r--shim/sl/canonical/ArmnnDevice.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/shim/sl/canonical/ArmnnDevice.cpp b/shim/sl/canonical/ArmnnDevice.cpp
index 2fc7ff1d12..3fd192630b 100644
--- a/shim/sl/canonical/ArmnnDevice.cpp
+++ b/shim/sl/canonical/ArmnnDevice.cpp
@@ -40,6 +40,20 @@ ArmnnDevice::ArmnnDevice(DriverOptions options)
, m_ClTunedParameters(nullptr)
, m_Options(std::move(options))
{
+ // First check if the DriverOptions is happy.
+ if (options.ShouldExit())
+ {
+ // Is this a good or bad exit?
+ if (options.GetExitCode() != EXIT_SUCCESS)
+ {
+ throw armnn::InvalidArgumentException("ArmnnDevice: Insufficient or illegal options specified.");
+ }
+ else
+ {
+ throw armnn::InvalidArgumentException("ArmnnDevice: Nothing to do.");
+ }
+ }
+
initVLogMask();
VLOG(DRIVER) << "ArmnnDevice::ArmnnDevice()";