ArmNN
 26.07
NeonBackendModelContext.hpp
Go to the documentation of this file.
1 //
2 // Copyright © 2020, 2026 Arm Ltd and Contributors. All rights reserved.
3 // SPDX-License-Identifier: MIT
4 //
5 #pragma once
6 
8 
9 namespace armnn
10 {
11 
12 /// The NeonBackendModelContext is used to pass in Neon specific backend ModelOptions. The supported backend
13 /// ModelOptions 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.
17 /// - "NumberOfThreads"\n
18 /// Specify the number of threads used by the CpuAcc backend.
19 /// - "SveEnabled"\n
20 /// Specify whether SVE/SVE2 implementations may be selected by the CpuAcc backend.
21 /// - "SmeEnabled"\n
22 /// Specify whether SME/SME2 implementations may be selected by the CpuAcc backend.
24 {
25 public:
26  NeonBackendModelContext(const ModelOptions& modelOptions);
27 
28  bool IsFastMathEnabled() const;
29 
30  unsigned int GetNumberOfThreads() const;
31 
32  void ApplyAclIsaPolicy() const;
33 
34 private:
35  bool m_IsFastMathEnabled;
36  unsigned int m_NumberOfThreads;
37  bool m_IsSveEnabled;
38  bool m_IsSmeEnabled;
39 };
40 
41 } // namespace armnn
The NeonBackendModelContext is used to pass in Neon specific backend ModelOptions.
NeonBackendModelContext(const ModelOptions &modelOptions)
Copyright (c) 2021 ARM Limited and Contributors.
std::vector< BackendOptions > ModelOptions