Sadik Armagan | 045f6be | 2020-09-10 13:37:32 +0100 | [diff] [blame] | 1 | // |
| 2 | // Copyright © 2020 Arm Ltd and Contributors. All rights reserved. |
| 3 | // SPDX-License-Identifier: MIT |
| 4 | // |
| 5 | #pragma once |
| 6 | |
| 7 | #include <armnn/backends/IBackendContext.hpp> |
| 8 | |
| 9 | namespace armnn |
| 10 | { |
| 11 | |
Mike Kelly | f9f33a0 | 2020-10-14 11:48:21 +0100 | [diff] [blame] | 12 | /// The ClBackendModelContext is used to pass in CL specific backend ModelOptions. The supported backend ModelOptions |
| 13 | /// are: |
| 14 | /// - "FastMathEnabled"\n |
| 15 | /// Using the fast_math flag can lead to performance improvements in fp32 and fp16 layers but may result in\n |
| 16 | /// results with reduced or different precision. The fast_math flag will not have any effect on int8 performance. |
Sadik Armagan | 045f6be | 2020-09-10 13:37:32 +0100 | [diff] [blame] | 17 | class ClBackendModelContext : public IBackendModelContext |
| 18 | { |
| 19 | public: |
| 20 | ClBackendModelContext(const ModelOptions& modelOptions); |
| 21 | |
| 22 | bool IsFastMathEnabled() const; |
| 23 | |
| 24 | private: |
| 25 | bool m_IsFastMathEnabled; |
| 26 | }; |
| 27 | |
| 28 | } // namespace armnn |