Skip to content

Add alpha support for 9.7 data processing intrinsics#428

Open
rockdreamer wants to merge 8 commits intoARM-software:mainfrom
rockdreamer:dp97
Open

Add alpha support for 9.7 data processing intrinsics#428
rockdreamer wants to merge 8 commits intoARM-software:mainfrom
rockdreamer:dp97

Conversation

@rockdreamer
Copy link
Contributor


name: Add alpha support for 9.7 data processing intrinsics
about: feature proposal.


This change adds intrinsics for the following architectural features:

  • FEAT_F16F32DOT
  • FEAT_F16F32MM
  • FEAT_F16MM
  • FEAT_SVE_B16MM
  • FEAT_SVE2p3
  • FEAT_SME2p3

Checklist: (mark with X those which apply)

  • If an issue reporting the bug exists, I have mentioned it in the
    PR (do not bother creating the issue if all you want to do is
    fixing the bug yourself).
  • I have added/updated the SPDX-FileCopyrightText lines on top
    of any file I have edited. Format is SPDX-FileCopyrightText: Copyright {year} {entity or name} <{contact informations}>
    (Please update existing copyright lines if applicable. You can
    specify year ranges with hyphen , as in 2017-2019, and use
    commas to separate gaps, as in 2018-2020, 2022).
  • I have updated the Copyright section of the sources of the
    specification I have edited (this will show up in the text
    rendered in the PDF and other output format supported). The
    format is the same described in the previous item.
  • I have run the CI scripts (if applicable, as they might be
    tricky to set up on non-*nix machines). The sequence can be
    found in the contribution
    guidelines
    . Don't
    worry if you cannot run these scripts on your machine, your
    patch will be automatically checked in the Actions of the pull
    request.
  • I have added an item that describes the changes I have
    introduced in this PR in the section Changes for next
    release
    of the section Change Control/Document history
    of the document. Create Changes for next release if it does
    not exist. Notice that changes that are not modifying the
    content and rendering of the specifications (both HTML and PDF)
    do not need to be listed.
  • When modifying content and/or its rendering, I have checked the
    correctness of the result in the PDF output (please refer to the
    instructions on how to build the PDFs
    locally
    ).
  • The variable draftversion is set to true in the YAML header
    of the sources of the specifications I have modified.
  • Please DO NOT add my GitHub profile to the list of contributors
    in the README page of the project.

This change adds
- AdvSIMD dot intrinsics available under FEAT_F16F32DOT
- SVE dot intrinsics available under either FEAT_SVE2p3 || FEAT_SME2p3
This change adds
- AdvSIMD intrinsics based on FMMLA available under FEAT_F16F32MM and FEAT_F16MM
- SVE intrinsics available under either FEAT_F16MM and FEAT_SVE_B16MM
This change adds support for the svluti6 operations under FEAT_SVE2p3 and FEAT_SME2p3.
This change adds support for the svaddqp, svaddsubp and svsubp operations under FEAT_SVE2p3 and FEAT_SME2p3.
This change adds support for the svcvt* operations under FEAT_SVE2p3 and FEAT_SME2p3.
This change adds support for the svaba operations under FEAT_SVE2p3 and FEAT_SME2p3.
This change adds support for new svqshrn, svqshrun operations under FEAT_SVE2p3 and FEAT_SME2p3.
|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------|--------------------------------|-------------------|---------------------------|
| <code>float32x2_t <a href="https://developer.arm.com/architectures/instruction-sets/intrinsics/vfdot_f32_f16" target="_blank">vfdot_f32_f16</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp; float32x2_t r,<br>&nbsp;&nbsp;&nbsp;&nbsp; float16x4_t a,<br>&nbsp;&nbsp;&nbsp;&nbsp; float16x4_t b)</code> | `r -> Vd.2S`<br>`a -> Vn.4H`<br>`b -> Vm.4H` | `FDOT Vd.2S,Vn.4H,Vm.4H` | `Vd.2S -> result` | `A64` |
| <code>float32x4_t <a href="https://developer.arm.com/architectures/instruction-sets/intrinsics/vfdotq_f32_f16" target="_blank">vfdotq_f32_f16</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp; float32x4_t r,<br>&nbsp;&nbsp;&nbsp;&nbsp; float16x8_t a,<br>&nbsp;&nbsp;&nbsp;&nbsp; float16x8_t b)</code> | `r -> Vd.4S`<br>`a -> Vn.8H`<br>`b -> Vm.8H` | `FDOT Vd.4S,Vn.8H,Vm.8H` | `Vd.4S -> result` | `A64` |
| <code>float32x2_t <a href="https://developer.arm.com/architectures/instruction-sets/intrinsics/vfdot_lane_f32_f16" target="_blank">vfdot_lane_f32_f16</a>(<br>&nbsp;&nbsp;&nbsp;&nbsp; float32x2_t r,<br>&nbsp;&nbsp;&nbsp;&nbsp; float16x4_t a,<br>&nbsp;&nbsp;&nbsp;&nbsp; float16x2_t b,<br>&nbsp;&nbsp;&nbsp;&nbsp; const int lane)</code> | `r -> Vd.2S`<br>`a -> Vn.4H`<br>`b -> Vm.2H`<br>`0 <= lane <= 3` | `FDOT Vd.2S,Vn.4H,Vm.2H[lane]` | `Vd.2S -> result` | `A64` |
Copy link
Contributor

@ricbal02 ricbal02 Feb 27, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

float16x4_t b for vfdot_lane and
float16x8_t b for vfdot_laneq

``` c
// Variants are also available for _s32_s16 and _u32_u16
// Variants are also available for _s32_s16, _u32_u16
// and also for _s16_s8 and _u16_u8 if (__ARM_FEATURE_SVE2p3 __ARM || _FEATURE_SME2p3).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

__ARM seems misplaced here?

``` c
// Variants are also available for _s32_s16 and _u32_u16
// Variants are also available for _s32_s16, _u32_u16
// and also for _s16_s8 and _u16_u8 if (__ARM_FEATURE_SVE2p3 __ARM || _FEATURE_SME2p3).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

__ARM seems misplaced here?

[**Alpha** state](#current-status-and-anticipated-changes) and might change or be
extended in the future.

`__ARM_FEATURE_F16F32MM` is defined if the NEON half-precision matrix multiply
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NEON should be Neon. Same everywhere else.


### SVE2 floating-point matrix multiply-accumulate instructions.

#### BFMMLA, FMMLA(non-widening)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Space before ( ?


#### FCVTZSN, FCVTZUN

Floating-point narrowing convert to interleaved integer, rounding toward zero
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing full-stop (.) at end of this line, possibly others?

// Variants are also available for
// _s32[_s16], _s64[_s32],
// _u16[_u8], _u32[_u16], _u64[_u32].
svint16_t svaba_s16[_s8](svint16_t zda, svint8_t zn, svint8_t zm);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In other widening intrinsics we include l in the intrinsic name, so this should be svabal ?

// Variants are also available for
// _s16[_f32_x2], _s32[_f64_x2],
// _u8[_f16_x2], _u16[_f32_x2], _u32[_f64_x2].
svint8_t svcvt_s8[_f16_x2](svfloat16x2_t zn);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other narrowing conversions have different naming - they include the suffix, e.g. svcvtxnt, so should this be svsvcntzn or similar?

// Variants are also available for
// _s32[_s16], _s64[_s32],
// _u16[_u8], _u32[_u16], _u64[_u32].
svint16_t svaba_s16[_s8](svint16_t zda, svint8_t zn, svint8_t zm);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't we do svint16_t svaba[_s16_s8](svint16_t zda, svint8_t zn, svint8_t zm);?
Or is svint16_t svaba(svint16_t zda, svint8_t zn, svint8_t zm); already defined elsewhere?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants