telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2017 Arm Ltd. All rights reserved. |
David Beck | 93e4898 | 2018-09-05 13:05:09 +0100 | [diff] [blame] | 3 | // SPDX-License-Identifier: MIT |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 4 | // |
| 5 | |
| 6 | #pragma once |
| 7 | |
| 8 | #include <armnn/ArmNN.hpp> |
| 9 | |
| 10 | #include <set> |
| 11 | #include <string> |
Nattapat Chaimanowong | d5fd976 | 2019-04-04 13:33:10 +0100 | [diff] [blame] | 12 | #include <vector> |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 13 | |
| 14 | namespace armnn_driver |
| 15 | { |
| 16 | |
| 17 | class DriverOptions |
| 18 | { |
| 19 | public: |
Nikhil Raj | 7760582 | 2018-09-03 11:25:56 +0100 | [diff] [blame] | 20 | DriverOptions(armnn::Compute computeDevice, bool fp16Enabled = false); |
Nattapat Chaimanowong | d5fd976 | 2019-04-04 13:33:10 +0100 | [diff] [blame] | 21 | DriverOptions(const std::vector<armnn::BackendId>& backends, bool fp16Enabled); |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 22 | DriverOptions(int argc, char** argv); |
| 23 | DriverOptions(DriverOptions&& other) = default; |
| 24 | |
Nattapat Chaimanowong | d5fd976 | 2019-04-04 13:33:10 +0100 | [diff] [blame] | 25 | const std::vector<armnn::BackendId>& GetBackends() const { return m_Backends; } |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 26 | bool IsVerboseLoggingEnabled() const { return m_VerboseLogging; } |
| 27 | const std::string& GetRequestInputsAndOutputsDumpDir() const { return m_RequestInputsAndOutputsDumpDir; } |
Kevin May | abc95d0 | 2020-05-15 15:34:03 +0100 | [diff] [blame] | 28 | const std::string& GetServiceName() const { return m_ServiceName; } |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 29 | const std::set<unsigned int>& GetForcedUnsupportedOperations() const { return m_ForcedUnsupportedOperations; } |
| 30 | const std::string& GetClTunedParametersFile() const { return m_ClTunedParametersFile; } |
| 31 | armnn::IGpuAccTunedParameters::Mode GetClTunedParametersMode() const { return m_ClTunedParametersMode; } |
Ruomei Yan | 689c6ee | 2019-04-25 17:48:41 +0100 | [diff] [blame] | 32 | armnn::IGpuAccTunedParameters::TuningLevel GetClTuningLevel() const { return m_ClTuningLevel; } |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 33 | bool IsGpuProfilingEnabled() const { return m_EnableGpuProfiling; } |
Mike Kelly | 7ed56dd | 2020-09-30 20:22:56 +0100 | [diff] [blame] | 34 | bool IsFastMathEnabled() const { return m_FastMathEnabled; } |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 35 | bool GetFp16Enabled() const { return m_fp16Enabled; } |
Narumol Prangnawarat | 856d1c9 | 2019-05-03 16:42:52 +0100 | [diff] [blame] | 36 | void SetBackends(const std::vector<armnn::BackendId>& backends) { m_Backends = backends; } |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 37 | |
| 38 | private: |
Nattapat Chaimanowong | d5fd976 | 2019-04-04 13:33:10 +0100 | [diff] [blame] | 39 | std::vector<armnn::BackendId> m_Backends; |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 40 | bool m_VerboseLogging; |
| 41 | std::string m_RequestInputsAndOutputsDumpDir; |
Kevin May | abc95d0 | 2020-05-15 15:34:03 +0100 | [diff] [blame] | 42 | std::string m_ServiceName; |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 43 | std::set<unsigned int> m_ForcedUnsupportedOperations; |
| 44 | std::string m_ClTunedParametersFile; |
| 45 | armnn::IGpuAccTunedParameters::Mode m_ClTunedParametersMode; |
Ruomei Yan | 689c6ee | 2019-04-25 17:48:41 +0100 | [diff] [blame] | 46 | armnn::IGpuAccTunedParameters::TuningLevel m_ClTuningLevel; |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 47 | bool m_EnableGpuProfiling; |
| 48 | bool m_fp16Enabled; |
Mike Kelly | 7ed56dd | 2020-09-30 20:22:56 +0100 | [diff] [blame] | 49 | bool m_FastMathEnabled; |
telsoa01 | ce3e84a | 2018-08-31 09:31:35 +0100 | [diff] [blame] | 50 | }; |
| 51 | |
| 52 | } // namespace armnn_driver |