Thanks to visit codestin.com
Credit goes to github.com

Skip to content

ENH: Add CPU feature detection for SVE2 #21638

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
EwoutH opened this issue May 30, 2022 · 8 comments
Open

ENH: Add CPU feature detection for SVE2 #21638

EwoutH opened this issue May 30, 2022 · 8 comments
Labels
01 - Enhancement component: SIMD Issues in SIMD (fast instruction sets) code or machinery

Comments

@EwoutH
Copy link
Contributor

EwoutH commented May 30, 2022

Proposed new feature or change:

Add CPU feature detection for SVE2. On wide CPU cores the Scalable Vector Extension has the potential to increase performance manyfold compared to NEON.

SVE2 is supported on most Armv9 cores, including the Arm Cortex-A510, Cortex-A710, Cortex-X2 and Neoverse N2 CPU designs. This means it's (to be) found in a huge amount of devices.

Arm documentation: https://developer.arm.com/Architectures/SVE

Introducing SVE2

This section introduces the Scalable Vector Extension version two (SVE2) of the Arm AArch64 architecture.

Following the development of the Neon architecture extension, which has a fixed 128-bit vector length for the instruction set, Arm designed the Scalable Vector Extension (SVE). SVE is a new Single Instruction Multiple Data (SIMD) instruction set that is used as an extension to AArch64, to allow for flexible vector length implementations. SVE improves the suitability of the architecture for High Performance Computing (HPC) applications, which require very large quantities of data processing.

SVE2 is a superset of SVE and Neon. SVE2 allows for more function domains in data-level parallelism. SVE2 inherits the concept, vector registers, and operation principles of SVE. SVE and SVE2 define 32 scalable vector registers. Silicon partners can choose a suitable vector length design implementation for hardware that varies between 128 bits and 2048 bits, at 128-bit increments. The advantage of SVE and SVE2 is that only one vector instruction set uses the scalable variables.

This enhancement might be similar to #20821 and #20552.

@EwoutH
Copy link
Contributor Author

EwoutH commented May 31, 2022

Some other projects that have implemented SVE2 support, which might or might not be useful resources:

@rgommers rgommers added component: SIMD Issues in SIMD (fast instruction sets) code or machinery 01 - Enhancement labels Jun 12, 2022
@rgommers
Copy link
Member

Sounds like a good idea to me.

@EwoutH
Copy link
Contributor Author

EwoutH commented Jun 29, 2022

Arm’s client CPU cores targeted for 2023 devices have been announced, the Cortex-X3, Cortex-A715 and refreshed Cortex-A510, and all boast faster SVE2 implementations (especially at the decoding stage). The maximum CPU cluster size has been expanded from 8 to 12 cores, making it more likely these cores will also end up in laptops.

@kawakami-k
Copy link
Contributor

kawakami-k commented Sep 7, 2022

Hi, @EwoutH
I am trying an implementation for SVE. Here is the source code, and I have confirmed that it works on Fujitsu A64FX (Armv8.2a + SVE 512 bits).

I am planning to submit a pull request in the near future.
Are you working on an SVE/SVE2 implementation?

@kawakami-k
Copy link
Contributor

I did the PR. #22265

@EwoutH
Copy link
Contributor Author

EwoutH commented Sep 16, 2022

Awesome, thanks a lot! This is also great timing with the announcement of Neoverse V2 and E2 CPU cores!

Do you by any chance have any performance benchmarks? (see maybe benchmark docs)

@EwoutH
Copy link
Contributor Author

EwoutH commented May 24, 2024

The Apple M4 is talked a lot about in the last week, apparently it's a full-fledged ARMv9.4 CPU with SME2 support, which would imply SME and SVE2 support. And apparently the SME2 support will replace Apple's own AMX.

See

image

@johnnynunez
Copy link

how is it going this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
01 - Enhancement component: SIMD Issues in SIMD (fast instruction sets) code or machinery
Projects
None yet
Development

No branches or pull requests

4 participants