| AI Engine-ML v2 Intrinsics User Guide v2025.2

Loading...
Searching...
No Matches
Topics
Vector Data Types

## Topics
| Brain Floating-Point Vector Types
| Complex Floating-Point Vector Types
| Complex Vector Types
| Floating-Point Vector Types
| Integer Vector Types
| MX Vector Types
| Microscaling Formats (MX) vector data-types are stored in the vector registers within the AIE-ML v2.
| Sparse Vector Types

## Detailed Description

Vector data-types pack multiple scalar data elements into a wider vector. There are vector data-types with standard sized elements (4-bit, 8-bit, 16-bit, 32-bit).

The general naming convention for these data-types is shown below.

        v{NumLanes}[cu]int{SizeofElement}
        v{NumLanes}bfloat16
        v{NumLanes}float[8,16]
        v{NumLanes}mx{6,9}

Disambiguation :

- 'int' denotes integer fixed-point registers.
- 'cint' denotes complex integer fixed-point registers.
- 'bfloat8' denotes brain-float (1b sign, 5b exponent, 2b mantissa).
- 'bfloat16' denotes brain-float (1b sign, 8b exponent, 7b mantissa).
- 'cbfloat16' denotes complex brain-float (1b sign, 8b exponent, 7b mantissa).
- 'float8' denotes floating-point 8-bit (1b sign, 5b exponent, 2b mantissa).
- 'float16' denotes floating-point 16-bit (1b sign, 5b exponent, 10b mantissa).
- 'float' denotes floating-point 32-bit (1b sign, 8b exponent, 23b mantissa).
- 'cfloat' denotes complex floating-point 32-bit (1b sign, 8b exponent, 23b mantissa).
- 'mx' denotes shared exponent (formerly block floating-point or bfp). Please refer to MX Vector Types for more information.
- 'accfloat' denotes single precision floating point values (1b sign, 8b exponent, 23b exponent). (Note : bfloat16 operations use the accfloat format as accumulator registers)
- 'u' denotes unsigned
- 'c' denotes complex

For example, `v32uint4`, `v16int8`, `v8int16`, `v128int4`, `v32bfloat16`, `v32float16`

The total data-width of the vector data-types can be 128-bits, 256-bits, 512-bits, or 1024-bits.

Note
  Vector data-types are stored in different sets of registers within the processor core. Large vectors (>256-bits) occupy more than one physical register. Register spills will reduce performance when more than one large register is 'live'.

Supported vector types and sizes
Scalar type | Supported vector lanes
--- | ---
int4/uint4 | 32/64/128/256
int8/uint8 | 16/32/64/128
int16/uint16 | 8/16/32/64
int32/uint32 | 4/8/16/32
cint16 | 4/8/16/32
cint32 | 2/4/8/16
cfloat | 2/4/8/16/32
bfloat8 | 8/16/32/64/128/256
bfloat16 | 8/16/32/64/128
cbfloat16 | 4/8/16/32/64
float8 | 2/4/8/16/32/64/128/
float16 | 2/4/8/16/32/64/128
float | 2/4/8/16/32/64
mx4 | 16/64/128/256
mx6 | 16/64/128/256
mx9 | 16/32/64/128/256
int4/uint4_sparse | 64/128
int8/uint8_sparse | 128/256
int16/uint16_sparse | 64/128
float8_sparse | 128/256
float16_sparse | 64/128
bfloat8_sparse | 128/256
bfloat16_sparse | 64/128