Compute Library
 22.05
Context::Options Struct Reference

< Context options More...

#include <Acl.hpp>

Collaboration diagram for Context::Options:
[legend]

Public Member Functions

 Options ()
 Default Constructor. More...
 
 Options (ExecutionMode mode, AclTargetCapabilities caps, bool enable_fast_math, const char *kernel_config, int32_t max_compute_units, AclAllocator *allocator)
 Constructor. More...
 

Data Fields

AclContextOptions copts {}
 

Static Public Attributes

static constexpr int32_t num_threads_auto = -1
 Allow runtime to specify number of threads. More...
 

Detailed Description

< Context options

Definition at line 321 of file Acl.hpp.

Constructor & Destructor Documentation

◆ Options() [1/2]

Options ( )
inline

Default Constructor.

Note
By default no precision loss is enabled for operators
By default the preferred execution mode is to favor multiple consecutive reruns of an operator

Definition at line 330 of file Acl.hpp.

331  : Options(ExecutionMode::FastRerun /* mode */,
332  AclCpuCapabilitiesAuto /* caps */,
333  false /* enable_fast_math */,
334  nullptr /* kernel_config */,
335  num_threads_auto /* max_compute_units */,
336  nullptr /* allocator */)
337  {
338  }
Automatic discovery of capabilities.
Definition: AclTypes.h:79
Prefer minimum latency in consecutive runs, might introduce higher startup times. ...
static constexpr int32_t num_threads_auto
Allow runtime to specify number of threads.
Definition: Acl.hpp:323
Options()
Default Constructor.
Definition: Acl.hpp:330

◆ Options() [2/2]

Options ( ExecutionMode  mode,
AclTargetCapabilities  caps,
bool  enable_fast_math,
const char *  kernel_config,
int32_t  max_compute_units,
AclAllocator allocator 
)
inline

Constructor.

Parameters
[in]modeExecution mode to be used
[in]capsCapabilities to be used
[in]enable_fast_mathAllow precision loss in favor of performance
[in]kernel_configKernel configuration file containing construction tuning meta-data
[in]max_compute_unitsMax compute units that are expected to used
[in]allocatorAllocator to be used for internal memory allocation

Definition at line 348 of file Acl.hpp.

References arm_compute::test::validation::allocator(), and clang_tidy_rules::mode.

354  {
355  copts.mode = detail::as_cenum<AclExecutionMode>(mode);
356  copts.capabilities = caps;
357  copts.enable_fast_math = enable_fast_math;
358  copts.kernel_config_file = kernel_config;
359  copts.max_compute_units = max_compute_units;
361  }
AclContextOptions copts
Definition: Acl.hpp:363
const char * kernel_config_file
Kernel cofiguration file.
Definition: AclTypes.h:139
int32_t max_compute_units
Max compute units that can be used by a queue created from the context.
Definition: AclTypes.h:140
AclExecutionMode mode
Execution mode to use.
Definition: AclTypes.h:136
AclTargetCapabilities capabilities
Target capabilities.
Definition: AclTypes.h:137
input allocator() -> allocate()
bool enable_fast_math
Allow precision loss.
Definition: AclTypes.h:138
AclAllocator * allocator
Allocator to be used by all the memory internally.
Definition: AclTypes.h:142

Field Documentation

◆ copts

Definition at line 363 of file Acl.hpp.

Referenced by Context::Context(), and arm_compute::test::validation::TEST_CASE().

◆ num_threads_auto

constexpr int32_t num_threads_auto = -1
static

Allow runtime to specify number of threads.

Definition at line 323 of file Acl.hpp.


The documentation for this struct was generated from the following file: