![]() |
AI Engine-ML Intrinsics User Guide (v2025.2)
|
Sparse vector data-types are stored in the vector registers within the AIE-ML. They can be used as the second argument to mac operations.
The supported sparse data layout requires a minimum of 50% sparsity.
Specifically, two zero values within each group of four consecutive values.
This 50% is a lower bound on the sparsity, meaning that further compression is possible if more zeroes are present.
Loading sparse data from memory will interpret the first 64 bits as a mask:
Hence, masks describe the layout of 512 bits after decompression.
Each mask must be aligned to a 32-bit boundary. Failure to meet this requirement will result in incorrect parsing.
When loading sparse data, a partial decompression is carried out to reconstruct the data such that:
| Mask bits | Partially decompressed data | |||
|---|---|---|---|---|
| 0 | 0 | 0 | 0 | 0 , 0 |
| 0 | 0 | 0 | 1 | 0 , A |
| 0 | 0 | 1 | 0 | 0 , B |
| 0 | 0 | 1 | 1 | B , A |
| 0 | 1 | 0 | 0 | C , 0 |
| 0 | 1 | 0 | 1 | C , A |
| 0 | 1 | 1 | 0 | C , B |
| 0 | 1 | 1 | 1 | C , B |
| 1 | 0 | 0 | 0 | D , 0 |
| 1 | 0 | 0 | 1 | D , A |
| 1 | 0 | 1 | 0 | D , B |
| 1 | 1 | 0 | 0 | D , C |
Topics | |
| Sparse floating-point vector types | |
| Sparse integer vector types | |