Skip to content

Commit 56fb677

Browse files
authored
Add floating point matrix multiply-add widening (FMMLA) intrinsics (#409)
1 parent d294acf commit 56fb677

File tree

5 files changed

+195
-45
lines changed

5 files changed

+195
-45
lines changed

main/acle.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,9 @@ Armv8.4-A [[ARMARMv84]](#ARMARMv84). Support is added for the Dot Product intrin
465465

466466
* Added feature test macro for FEAT_SSVE_FEXPA.
467467
* Added feature test macro for FEAT_CSSC.
468+
* Added support for FEAT_FPRCVT intrinsics and `__ARM_FEATURE_FPRCVT`.
469+
* Added support for modal 8-bit floating point matrix multiply-accumulate widening intrinsics.
470+
* Added support for 16-bit floating point matrix multiply-accumulate widening intrinsics.
468471

469472
### References
470473

@@ -2207,6 +2210,13 @@ ACLE intrinsics are available. This implies that `__ARM_FEATURE_SM4` and
22072210
floating-point absolute minimum and maximum instructions (FEAT_FAMINMAX)
22082211
and if the associated ACLE intrinsics are available.
22092212

2213+
### FPRCVT extension
2214+
2215+
`__ARM_FEATURE_FPRCVT` is defined to `1` if there is hardware
2216+
support for floating-point to/from integer convertion instructions
2217+
with only scalar SIMD&FP register operands and results having
2218+
different input and output register sizes.
2219+
22102220
### Lookup table extensions
22112221

22122222
`__ARM_FEATURE_LUT` is defined to 1 if there is hardware support for
@@ -2346,6 +2356,26 @@ is hardware support for the SVE forms of these instructions and if the
23462356
associated ACLE intrinsics are available. This implies that
23472357
`__ARM_FEATURE_MATMUL_INT8` and `__ARM_FEATURE_SVE` are both nonzero.
23482358

2359+
##### Multiplication of modal 8-bit floating-point matrices
2360+
2361+
This section is in
2362+
[**Alpha** state](#current-status-and-anticipated-changes) and might change or be
2363+
extended in the future.
2364+
2365+
`__ARM_FEATURE_F8F16MM` is defined to `1` if there is hardware support
2366+
for the NEON and SVE modal 8-bit floating-point matrix multiply-accumulate to half-precision (FEAT_F8F16MM)
2367+
instructions and if the associated ACLE intrinsics are available.
2368+
2369+
`__ARM_FEATURE_F8F32MM` is defined to `1` if there is hardware support
2370+
for the NEON and SVE modal 8-bit floating-point matrix multiply-accumulate to single-precision (FEAT_F8F32MM)
2371+
instructions and if the associated ACLE intrinsics are available.
2372+
2373+
##### Multiplication of 16-bit floating-point matrices
2374+
2375+
`__ARM_FEATURE_SVE_F16F32MM` is defined to `1` if there is hardware support
2376+
for the SVE 16-bit floating-point to 32-bit floating-point matrix multiply and add
2377+
(FEAT_SVE_F16F32MM) instructions and if the associated ACLE intrinsics are available.
2378+
23492379
##### Multiplication of 32-bit floating-point matrices
23502380

23512381
`__ARM_FEATURE_SVE_MATMUL_FP32` is defined to `1` if there is hardware support
@@ -2590,6 +2620,7 @@ be found in [[BA]](#BA).
25902620
| [`__ARM_FEATURE_FP8DOT2`](#modal-8-bit-floating-point-extensions) | Modal 8-bit floating-point extensions | 1 |
25912621
| [`__ARM_FEATURE_FP8DOT4`](#modal-8-bit-floating-point-extensions) | Modal 8-bit floating-point extensions | 1 |
25922622
| [`__ARM_FEATURE_FP8FMA`](#modal-8-bit-floating-point-extensions) | Modal 8-bit floating-point extensions | 1 |
2623+
| [`__ARM_FEATURE_FPRCVT`](#fprcvt-extension) | FPRCVT extension | 1 |
25932624
| [`__ARM_FEATURE_FRINT`](#availability-of-armv8.5-a-floating-point-rounding-intrinsics) | Floating-point rounding extension (Arm v8.5-A) | 1 |
25942625
| [`__ARM_FEATURE_GCS`](#guarded-control-stack) | Guarded Control Stack | 1 |
25952626
| [`__ARM_FEATURE_GCS_DEFAULT`](#guarded-control-stack) | Guarded Control Stack protection can be enabled | 1 |
@@ -2637,6 +2668,9 @@ be found in [[BA]](#BA).
26372668
| [`__ARM_FEATURE_SVE_BITS`](#scalable-vector-extension-sve) | The number of bits in an SVE vector, when known in advance | 256 |
26382669
| [`__ARM_FEATURE_SVE_MATMUL_FP32`](#multiplication-of-32-bit-floating-point-matrices) | 32-bit floating-point matrix multiply extension (FEAT_F32MM) | 1 |
26392670
| [`__ARM_FEATURE_SVE_MATMUL_FP64`](#multiplication-of-64-bit-floating-point-matrices) | 64-bit floating-point matrix multiply extension (FEAT_F64MM) | 1 |
2671+
| [`__ARM_FEATURE_F8F16MM`](#multiplication-of-modal-8-bit-floating-point-matrices) | Modal 8-bit floating-point matrix multiply-accumulate to half-precision extension (FEAT_F8F16MM) | 1 |
2672+
| [`__ARM_FEATURE_F8F32MM`](#multiplication-of-modal-8-bit-floating-point-matrices) | Modal 8-bit floating-point matrix multiply-accumulate to single-precision extension (FEAT_F8F32MM) | 1 |
2673+
| [`__ARM_FEATURE_SVE_F16F32MM`](#multiplication-of-16-bit-floating-point-matrices) | 16-bit floating-point matrix multiply-accumulate to single-precision extension (FEAT_SVE_F16F32MM) | 1 |
26402674
| [`__ARM_FEATURE_SVE_MATMUL_INT8`](#multiplication-of-8-bit-integer-matrices) | SVE support for the integer matrix multiply extension (FEAT_I8MM) | 1 |
26412675
| [`__ARM_FEATURE_SVE_PREDICATE_OPERATORS`](#scalable-vector-extension-sve) | Level of support for C and C++ operators on SVE vector types | 1 |
26422676
| [`__ARM_FEATURE_SVE_VECTOR_OPERATORS`](#scalable-vector-extension-sve) | Level of support for C and C++ operators on SVE predicate types | 1 |
@@ -9374,6 +9408,31 @@ BFloat16 floating-point multiply vectors.
93749408
uint64_t imm_idx);
93759409
```
93769410

9411+
### SVE2 floating-point matrix multiply-accumulate instructions.
9412+
9413+
#### FMMLA (widening, FP8 to FP16)
9414+
9415+
Modal 8-bit floating-point matrix multiply-accumulate to half-precision.
9416+
```c
9417+
// Only if (__ARM_FEATURE_SVE2 && __ARM_FEATURE_F8F16MM)
9418+
svfloat16_t svmmla[_f16_mf8]_fpm(svfloat16_t zda, svmfloat8_t zn, svmfloat8_t zm, fpm_t fpm);
9419+
```
9420+
9421+
#### FMMLA (widening, FP8 to FP32)
9422+
9423+
Modal 8-bit floating-point matrix multiply-accumulate to single-precision.
9424+
```c
9425+
// Only if (__ARM_FEATURE_SVE2 && __ARM_FEATURE_F8F32MM)
9426+
svfloat32_t svmmla[_f32_mf8]_fpm(svfloat32_t zda, svmfloat8_t zn, svmfloat8_t zm, fpm_t fpm);
9427+
```
9428+
#### FMMLA (widening, FP16 to FP32)
9429+
9430+
16-bit floating-point matrix multiply-accumulate to single-precision.
9431+
```c
9432+
// Only if __ARM_FEATURE_SVE_F16F32MM
9433+
svfloat32_t svmmla[_f32_f16](svfloat32_t zda, svfloat16_t zn, svfloat16_t zm);
9434+
```
9435+
93779436
### SVE2.1 instruction intrinsics
93789437

93799438
The specification for SVE2.1 is in

0 commit comments

Comments
 (0)