Skip to content

[AArch64] NEON, SVE2 and SME2 instruction support with tests#439

Merged
FinnWilkinson merged 75 commits intodevfrom
sme-loops-support
Jun 24, 2025
Merged

[AArch64] NEON, SVE2 and SME2 instruction support with tests#439
FinnWilkinson merged 75 commits intodevfrom
sme-loops-support

Conversation

@FinnWilkinson
Copy link
Copy Markdown
Contributor

This PR adds a wide range of different NEON, SVE2, SME2 instructions with regressions tests. These facilitate a subset of some internal SME-based GEMM and GEMV codes.

There is some BF16 prototypical instruction support which by default is disabled (using a new build option and an if statement in each appropriate switch statement case) due to some usage of __bf16 which is not compiler agnostic, some hacky usage of memcpy to re-interpret uint16_t, and a lack of regression tests for the BF16 instructions in question.

These BF16 instructions can be enabled through a new CMake option -DSIMENG_ENABLE_BF16=ON. I have deliberately not included this in the documentation given the possible instibility of the BF16 implementation and to keep it for (mainly) internal usage only.

This branch is based on sme2-support (PR #429 ) and so should be merged after this brnch has been merged into dev.

Some SM2 instructions which use multi-vector operands can be non-trivial to read or understand. Please ask for clarification and suggest any additional comments that may help future understanding.

@FinnWilkinson FinnWilkinson added the enhancement New feature or request label Nov 4, 2024
@FinnWilkinson FinnWilkinson self-assigned this Nov 4, 2024
@FinnWilkinson FinnWilkinson changed the base branch from dev to sme2-support November 4, 2024 18:12
@FinnWilkinson FinnWilkinson force-pushed the sme-loops-support branch 2 times, most recently from f9a759f to f2b86fa Compare November 7, 2024 19:58
Copy link
Copy Markdown
Contributor

@ABenC377 ABenC377 left a comment

Choose a reason for hiding this comment

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

Only a few comments

Comment thread CMakeLists.txt
Comment thread src/include/simeng/arch/aarch64/Instruction.hh Outdated
Comment thread src/include/simeng/arch/aarch64/helpers/sve.hh Outdated
Comment thread src/include/simeng/arch/aarch64/helpers/neon.hh Outdated
Comment thread src/include/simeng/arch/aarch64/operandContainer.hh
Comment thread src/lib/arch/aarch64/Instruction_decode.cc Outdated
Comment thread src/lib/arch/aarch64/Instruction_execute.cc Outdated
Comment thread test/regression/aarch64/AArch64RegressionTest.hh Outdated
Comment thread test/regression/aarch64/Exception.cc
Comment thread src/lib/arch/aarch64/Instruction_execute.cc
Comment thread src/lib/arch/aarch64/Instruction_execute.cc
Comment thread src/include/simeng/arch/aarch64/Instruction.hh Outdated
Comment thread CMakeLists.txt
ABenC377
ABenC377 previously approved these changes Dec 17, 2024
@FinnWilkinson FinnWilkinson force-pushed the sme-loops-support branch 2 times, most recently from 393dd26 to b027f73 Compare December 18, 2024 15:07
@FinnWilkinson FinnWilkinson changed the base branch from sme2-support to dev December 20, 2024 10:01
@FinnWilkinson FinnWilkinson dismissed ABenC377’s stale review December 20, 2024 10:01

The base branch was changed.

ABenC377
ABenC377 previously approved these changes Dec 20, 2024
Comment thread src/include/simeng/arch/aarch64/helpers/sve.hh
Comment thread src/include/simeng/arch/aarch64/helpers/sve.hh Outdated
Comment thread src/include/simeng/arch/aarch64/helpers/sve.hh
Comment thread src/lib/arch/aarch64/Instruction_decode.cc Outdated
Comment thread test/regression/aarch64/instructions/sme.cc
@ABenC377 ABenC377 added the 0.9.7 Part of SimEng Release 0.9.7 label May 8, 2025
ABenC377
ABenC377 previously approved these changes May 13, 2025
Comment thread src/lib/arch/aarch64/Instruction_decode.cc Outdated
Comment thread src/include/simeng/arch/aarch64/helpers/sve.hh
Comment thread test/regression/aarch64/instructions/sme.cc
Copy link
Copy Markdown
Contributor

@JosephMoore25 JosephMoore25 left a comment

Choose a reason for hiding this comment

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

All looks good to me. Clear implementations and comments. Can't see anything wrong without digging into each instruction individually, but given tests have been written for each instruction and (I'm assuming) all pass, I'm happy for this to be merged.

Nice work!

@github-project-automation github-project-automation bot moved this from Changes Requested to Approved to Merge in SimEng Development Jun 20, 2025
@FinnWilkinson FinnWilkinson merged commit 93fe67d into dev Jun 24, 2025
37 checks passed
@github-project-automation github-project-automation bot moved this from Approved to Merge to Done in SimEng Development Jun 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

0.9.7 Part of SimEng Release 0.9.7 enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants