Compute Library
 21.08
AclTypes.h File Reference
#include <stddef.h>
#include <stdint.h>

Go to the source code of this file.

Data Structures

struct  AclAllocator
 
struct  AclContextOptions
 
struct  AclQueueOptions
 
struct  AclTensorDescriptor
 

Typedefs

typedef struct AclContext_AclContext
 < Opaque Context object More...
 
typedef struct AclQueue_AclQueue
 Opaque Tensor object. More...
 
typedef struct AclTensor_AclTensor
 Opaque Tensor pack object. More...
 
typedef struct AclTensorPack_AclTensorPack
 Opaque Operator object. More...
 
typedef struct AclOperator_AclOperator
 
typedef uint64_t AclTargetCapabilities
 Error codes returned by the public entry-points. More...
 
typedef enum AclStatus AclStatus
 Supported CPU targets. More...
 
typedef enum AclTarget AclTarget
 
typedef enum AclExecutionMode AclExecutionMode
 Execution mode types. More...
 
typedef enum AclCpuCapabilities AclCpuCapabilities
 Available CPU capabilities. More...
 
typedef struct AclAllocator AclAllocator
 Context options. More...
 
typedef struct AclContextOptions AclContextOptions
 Supported tuning modes. More...
 
typedef enum AclDataType AclDataType
 Supported data layouts for operations. More...
 
typedef enum AclDataLayout AclDataLayout
 
typedef enum AclImportMemoryType AclImportMemoryType
 Type of memory to be imported. More...
 
typedef struct AclTensorDescriptor AclTensorDescriptor
 Slot type of a tensor. More...
 

Enumerations

enum  AclStatus : int32_t {
  AclSuccess = 0, AclRuntimeError = 1, AclOutOfMemory = 2, AclUnimplemented = 3,
  AclUnsupportedTarget = 4, AclInvalidTarget = 5, AclInvalidArgument = 6, AclUnsupportedConfig = 7,
  AclInvalidObjectState = 8
}
 
enum  AclTarget { AclCpu = 0, AclGpuOcl = 1 }
 
enum  AclExecutionMode { AclPreferFastRerun = 0, AclPreferFastStart = 1 }
 Execution mode types. More...
 
enum  AclCpuCapabilities {
  AclCpuCapabilitiesAuto = 0, AclCpuCapabilitiesNeon = (1 << 0), AclCpuCapabilitiesSve = (1 << 1), AclCpuCapabilitiesSve2 = (1 << 2),
  AclCpuCapabilitiesFp16 = (1 << 7), AclCpuCapabilitiesBf16 = (1 << 8), AclCpuCapabilitiesDot = (1 << 13), AclCpuCapabilitiesMmlaInt8 = (1 << 14),
  AclCpuCapabilitiesMmlaFp = (1 << 15), AclCpuCapabilitiesAll = ~0
}
 Available CPU capabilities. More...
 
enum  AclTuningMode { AclTuningModeNone = 0, AclRapid = 1, AclNormal = 2, AclExhaustive = 3 }
 
enum  AclDataType {
  AclDataTypeUnknown = 0, AclUInt8 = 1, AclInt8 = 2, AclUInt16 = 3,
  AclInt16 = 4, AclUint32 = 5, AclInt32 = 6, AclFloat16 = 7,
  AclBFloat16 = 8, AclFloat32 = 9
}
 
enum  AclDataLayout { AclDataLayoutUnknown = 0, AclNhwc = 1, AclNchw = 2 }
 
enum  AclImportMemoryType { AclHostPtr = 0 }
 Type of memory to be imported. More...
 
enum  AclTensorSlot {
  AclSlotUnknown = -1, AclSrc = 0, AclSrc0 = 0, AclSrc1 = 1,
  AclDst = 30, AclSrcVec = 256
}
 

Typedef Documentation

◆ AclAllocator

typedef struct AclAllocator AclAllocator

Context options.

◆ AclContext

typedef struct AclContext_* AclContext

< Opaque Context object

Opaque Queue object

Definition at line 35 of file AclTypes.h.

◆ AclContextOptions

Supported tuning modes.

◆ AclCpuCapabilities

Available CPU capabilities.

Allocator interface that can be passed to a context

◆ AclDataLayout

◆ AclDataType

typedef enum AclDataType AclDataType

Supported data layouts for operations.

◆ AclExecutionMode

Execution mode types.

◆ AclImportMemoryType

Type of memory to be imported.

Tensor Descriptor

◆ AclOperator

typedef struct AclOperator_* AclOperator

Definition at line 43 of file AclTypes.h.

◆ AclQueue

typedef struct AclQueue_* AclQueue

Opaque Tensor object.

Definition at line 37 of file AclTypes.h.

◆ AclStatus

typedef enum AclStatus AclStatus

Supported CPU targets.

◆ AclTarget

typedef enum AclTarget AclTarget

◆ AclTargetCapabilities

typedef uint64_t AclTargetCapabilities

Error codes returned by the public entry-points.

Definition at line 46 of file AclTypes.h.

◆ AclTensor

typedef struct AclTensor_* AclTensor

Opaque Tensor pack object.

Definition at line 39 of file AclTypes.h.

◆ AclTensorDescriptor

Slot type of a tensor.

◆ AclTensorPack

typedef struct AclTensorPack_* AclTensorPack

Opaque Operator object.

Definition at line 41 of file AclTypes.h.

Enumeration Type Documentation

◆ AclCpuCapabilities

Available CPU capabilities.

Enumerator
AclCpuCapabilitiesAuto 

Automatic discovery of capabilities.

AclCpuCapabilitiesNeon 

Enable NEON optimized paths.

AclCpuCapabilitiesSve 

Enable SVE optimized paths.

AclCpuCapabilitiesSve2 

Enable SVE2 optimized paths.

AclCpuCapabilitiesFp16 

Enable float16 data-type support.

AclCpuCapabilitiesBf16 

Enable bfloat16 data-type support.

AclCpuCapabilitiesDot 

Enable paths that use the udot/sdot instructions.

AclCpuCapabilitiesMmlaInt8 

Enable paths that use the mmla integer instructions.

AclCpuCapabilitiesMmlaFp 

Enable paths that use the mmla float instructions.

AclCpuCapabilitiesAll 

Enable all paths.

Definition at line 77 of file AclTypes.h.

78 {
79  AclCpuCapabilitiesAuto = 0, /**< Automatic discovery of capabilities */
80 
81  AclCpuCapabilitiesNeon = (1 << 0), /**< Enable NEON optimized paths */
82  AclCpuCapabilitiesSve = (1 << 1), /**< Enable SVE optimized paths */
83  AclCpuCapabilitiesSve2 = (1 << 2), /**< Enable SVE2 optimized paths */
84  // Reserve 3, 4, 5, 6
85 
86  AclCpuCapabilitiesFp16 = (1 << 7), /**< Enable float16 data-type support */
87  AclCpuCapabilitiesBf16 = (1 << 8), /**< Enable bfloat16 data-type support */
88  // Reserve 9, 10, 11, 12
89 
90  AclCpuCapabilitiesDot = (1 << 13), /**< Enable paths that use the udot/sdot instructions */
91  AclCpuCapabilitiesMmlaInt8 = (1 << 14), /**< Enable paths that use the mmla integer instructions */
92  AclCpuCapabilitiesMmlaFp = (1 << 15), /**< Enable paths that use the mmla float instructions */
93 
94  AclCpuCapabilitiesAll = ~0 /**< Enable all paths */
Enable bfloat16 data-type support.
Definition: AclTypes.h:87
Enable all paths.
Definition: AclTypes.h:94
Automatic discovery of capabilities.
Definition: AclTypes.h:79
Enable SVE optimized paths.
Definition: AclTypes.h:82
Enable paths that use the mmla integer instructions.
Definition: AclTypes.h:91
Enable NEON optimized paths.
Definition: AclTypes.h:81
Enable SVE2 optimized paths.
Definition: AclTypes.h:83
Enable paths that use the mmla float instructions.
Definition: AclTypes.h:92
AclCpuCapabilities
Available CPU capabilities.
Definition: AclTypes.h:77
Enable float16 data-type support.
Definition: AclTypes.h:86
Enable paths that use the udot/sdot instructions.
Definition: AclTypes.h:90

◆ AclDataLayout

Enumerator
AclDataLayoutUnknown 

Unknown data layout.

AclNhwc 

Native, performant, Compute Library data layout.

AclNchw 

Data layout where width is the fastest changing dimension.

Definition at line 177 of file AclTypes.h.

178 {
179  AclDataLayoutUnknown = 0, /**< Unknown data layout */
180  AclNhwc = 1, /**< Native, performant, Compute Library data layout */
181  AclNchw = 2, /**< Data layout where width is the fastest changing dimension */
182 } AclDataLayout;
Native, performant, Compute Library data layout.
Definition: AclTypes.h:180
AclDataLayout
Definition: AclTypes.h:177
Unknown data layout.
Definition: AclTypes.h:179
Data layout where width is the fastest changing dimension.
Definition: AclTypes.h:181

◆ AclDataType

Enumerator
AclDataTypeUnknown 

Unknown data type.

AclUInt8 

8-bit unsigned integer

AclInt8 

8-bit signed integer

AclUInt16 

16-bit unsigned integer

AclInt16 

16-bit signed integer

AclUint32 

32-bit unsigned integer

AclInt32 

32-bit signed integer

AclFloat16 

16-bit floating point

AclBFloat16 

16-bit brain floating point

AclFloat32 

32-bit floating point

Definition at line 162 of file AclTypes.h.

163 {
164  AclDataTypeUnknown = 0, /**< Unknown data type */
165  AclUInt8 = 1, /**< 8-bit unsigned integer */
166  AclInt8 = 2, /**< 8-bit signed integer */
167  AclUInt16 = 3, /**< 16-bit unsigned integer */
168  AclInt16 = 4, /**< 16-bit signed integer */
169  AclUint32 = 5, /**< 32-bit unsigned integer */
170  AclInt32 = 6, /**< 32-bit signed integer */
171  AclFloat16 = 7, /**< 16-bit floating point */
172  AclBFloat16 = 8, /**< 16-bit brain floating point */
173  AclFloat32 = 9, /**< 32-bit floating point */
174 } AclDataType;
32-bit floating point
Definition: AclTypes.h:173
32-bit signed integer
Definition: AclTypes.h:170
AclDataType
Definition: AclTypes.h:162
Unknown data type.
Definition: AclTypes.h:164
16-bit signed integer
Definition: AclTypes.h:168
16-bit unsigned integer
Definition: AclTypes.h:167
32-bit unsigned integer
Definition: AclTypes.h:169
8-bit signed integer
Definition: AclTypes.h:166
16-bit brain floating point
Definition: AclTypes.h:172
16-bit floating point
Definition: AclTypes.h:171
8-bit unsigned integer
Definition: AclTypes.h:165

◆ AclExecutionMode

Execution mode types.

Enumerator
AclPreferFastRerun 

Prioritize performance when multiple iterations are performed.

AclPreferFastStart 

Prioritize performance when a single iterations is expected to be performed.

Definition at line 70 of file AclTypes.h.

71 {
72  AclPreferFastRerun = 0, /**< Prioritize performance when multiple iterations are performed */
73  AclPreferFastStart = 1, /**< Prioritize performance when a single iterations is expected to be performed */
Prioritize performance when a single iterations is expected to be performed.
Definition: AclTypes.h:73
Prioritize performance when multiple iterations are performed.
Definition: AclTypes.h:72
AclExecutionMode
Execution mode types.
Definition: AclTypes.h:70

◆ AclImportMemoryType

Type of memory to be imported.

Enumerator
AclHostPtr 

Host allocated memory.

Definition at line 185 of file AclTypes.h.

186 {
187  AclHostPtr = 0 /**< Host allocated memory */
Host allocated memory.
Definition: AclTypes.h:187
AclImportMemoryType
Type of memory to be imported.
Definition: AclTypes.h:185

◆ AclStatus

enum AclStatus : int32_t
Enumerator
AclSuccess 

Call succeeded, leading to valid state for all involved objects/data.

AclRuntimeError 

Call failed during execution.

AclOutOfMemory 

Call failed due to failure to allocate resources.

AclUnimplemented 

Call failed as requested capability is not implemented.

AclUnsupportedTarget 

Call failed as an invalid backend was requested.

AclInvalidTarget 

Call failed as invalid argument was passed.

AclInvalidArgument 

Call failed as invalid argument was passed.

AclUnsupportedConfig 

Call failed as configuration is unsupported.

AclInvalidObjectState 

Call failed as an object has invalid state.

Definition at line 49 of file AclTypes.h.

49  : int32_t
50 {
51  AclSuccess = 0, /**< Call succeeded, leading to valid state for all involved objects/data */
52  AclRuntimeError = 1, /**< Call failed during execution */
53  AclOutOfMemory = 2, /**< Call failed due to failure to allocate resources */
54  AclUnimplemented = 3, /**< Call failed as requested capability is not implemented */
55  AclUnsupportedTarget = 4, /**< Call failed as an invalid backend was requested */
56  AclInvalidTarget = 5, /**< Call failed as invalid argument was passed */
57  AclInvalidArgument = 6, /**< Call failed as invalid argument was passed */
58  AclUnsupportedConfig = 7, /**< Call failed as configuration is unsupported */
59  AclInvalidObjectState = 8, /**< Call failed as an object has invalid state */
60 } AclStatus;
Call failed during execution.
Definition: AclTypes.h:52
Call failed as invalid argument was passed.
Definition: AclTypes.h:56
Call failed as invalid argument was passed.
Definition: AclTypes.h:57
Call failed as an invalid backend was requested.
Definition: AclTypes.h:55
Call failed as configuration is unsupported.
Definition: AclTypes.h:58
Call succeeded, leading to valid state for all involved objects/data.
Definition: AclTypes.h:51
Call failed as requested capability is not implemented.
Definition: AclTypes.h:54
Call failed due to failure to allocate resources.
Definition: AclTypes.h:53
Call failed as an object has invalid state.
Definition: AclTypes.h:59
AclStatus
Definition: AclTypes.h:49

◆ AclTarget

enum AclTarget
Enumerator
AclCpu 

Cpu target that uses SIMD extensions.

AclGpuOcl 

OpenCL target for GPU.

Definition at line 63 of file AclTypes.h.

64 {
65  AclCpu = 0, /**< Cpu target that uses SIMD extensions */
66  AclGpuOcl = 1, /**< OpenCL target for GPU */
67 } AclTarget;
OpenCL target for GPU.
Definition: AclTypes.h:66
AclTarget
Definition: AclTypes.h:63
Cpu target that uses SIMD extensions.
Definition: AclTypes.h:65

◆ AclTensorSlot

Enumerator
AclSlotUnknown 
AclSrc 
AclSrc0 
AclSrc1 
AclDst 
AclSrcVec 

Definition at line 201 of file AclTypes.h.

202 {
203  AclSlotUnknown = -1,
204  AclSrc = 0,
205  AclSrc0 = 0,
206  AclSrc1 = 1,
207  AclDst = 30,
208  AclSrcVec = 256,
209 } AclTensorSlot;
AclTensorSlot
Definition: AclTypes.h:201

◆ AclTuningMode

Enumerator
AclTuningModeNone 

No tuning.

AclRapid 

Fast tuning mode, testing a small portion of the tuning space.

AclNormal 

Normal tuning mode, gives a good balance between tuning mode and performance.

AclExhaustive 

Exhaustive tuning mode, increased tuning time but with best results.

Definition at line 146 of file AclTypes.h.

147 {
148  AclTuningModeNone = 0, /**< No tuning */
149  AclRapid = 1, /**< Fast tuning mode, testing a small portion of the tuning space */
150  AclNormal = 2, /**< Normal tuning mode, gives a good balance between tuning mode and performance */
151  AclExhaustive = 3, /**< Exhaustive tuning mode, increased tuning time but with best results */
152 } AclTuningMode;
No tuning.
Definition: AclTypes.h:148
Normal tuning mode, gives a good balance between tuning mode and performance.
Definition: AclTypes.h:150
AclTuningMode
Definition: AclTypes.h:146
Fast tuning mode, testing a small portion of the tuning space.
Definition: AclTypes.h:149
Exhaustive tuning mode, increased tuning time but with best results.
Definition: AclTypes.h:151