AI Engine-ML v2 Intrinsics User Guide  v2025.1
Loading...
Searching...
No Matches
MX Vector Types

Microscaling Formats (MX) vector data-types are stored in the vector registers within the AIE-ML v2. More...

Data Structures

class  v128mx4
 
class  v128mx4_unaligned
 
class  v128mx6
 
class  v128mx6_unaligned
 
class  v128mx9
 
class  v128mx9_unaligned
 
class  v16mx4
 
class  v16mx6
 
class  v16mx9
 
class  v256mx4
 
class  v256mx4_unaligned
 
class  v256mx6
 
class  v256mx6_unaligned
 
struct  v256mx9
 
class  v32mx9
 
class  v32mx9_unaligned
 
class  v64mx4
 
class  v64mx4_unaligned
 
class  v64mx6
 
class  v64mx6_unaligned
 
class  v64mx9
 
class  v64mx9_unaligned
 

Detailed Description

Microscaling Formats (MX) vector data-types are stored in the vector registers within the AIE-ML v2.

The MX formats consist of a number of mantissas sharing a common exponent. In the 16-bit (MX9) format, the mantissas are 8 bits long and the exponent is 8 bits. In the 8-bit prime (MX6) format, the mantissas are 5 bits long, and the exponent is 8 bits. In the 3-bit prime (MX4) format, the mantissas are 3 bits long, and the exponent is 8 bits. In addition to the mantissas and exponents, every two mantissas share a sub-tile shift bit, which will be used to decrease the shared exponent by one for the pair of mantissas.

The exponent block size (EBS) indicates how many mantissas share a common exponent. Only EBS 16 is supported.

Register layout of MX datatypes

When MX9 (bfp16) is loaded from memory, it is stored in register as follows:

MX6 or bfp13' vectors are stored in registers as follows:

MX4 or bfp11 vectors are stored in registers as MX6 (bfp13) with zero padding as follows:

Memory layout of MX datatypes

In memory, MX9 (bfp16) is stored as consecutive blocks. Each block contains an 8-bit exponent, one byte for the sub-tile shifts, and 16 8-bit mantissa values.

In memory, MX6 (bfp13) is stored as consecutive blocks. Each block contains an 8-bit exponent, one byte for the sub-tile shifts, and 16 5-bit mantissa values.

In memory, MX4 (bfp11) is stored as consecutive blocks. Each block contains an 8-bit exponent, one byte for the sub-tile shifts, and 16 3-bit mantissa values.


Data Structure Documentation

◆ v128mx4

class v128mx4

◆ v128mx4_unaligned

class v128mx4_unaligned

◆ v128mx6

class v128mx6

◆ v128mx6_unaligned

class v128mx6_unaligned

◆ v128mx9

class v128mx9

◆ v128mx9_unaligned

class v128mx9_unaligned

◆ v16mx4

class v16mx4

◆ v16mx6

class v16mx6

◆ v16mx9

class v16mx9

◆ v256mx4

class v256mx4

◆ v256mx4_unaligned

class v256mx4_unaligned

◆ v256mx6

class v256mx6

◆ v256mx6_unaligned

class v256mx6_unaligned

◆ v256mx9

struct v256mx9
Data Fields
v128mx9 h
v128mx9 l

◆ v32mx9

class v32mx9

◆ v32mx9_unaligned

class v32mx9_unaligned

◆ v64mx4

class v64mx4

◆ v64mx4_unaligned

class v64mx4_unaligned

◆ v64mx6

class v64mx6

◆ v64mx6_unaligned

class v64mx6_unaligned

◆ v64mx9

class v64mx9

◆ v64mx9_unaligned

class v64mx9_unaligned