Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Sydde

macrumors 68030
Aug 17, 2009
2,563
7,061
IOKWARDI
What good is a Mx SoC with Armv9 instructions if compilers cannot use them?
The only instruction set enhancements to ARMv9 involve SVE2, an expansion of SVE. The rest of the spec involves security domains, and the part where AArch32 is optional. How much of that Apple has implemented is unclear, but for the lion's share of programs, ARMv9 offers minimal coding improvements.
 
  • Like
Reactions: altaic

leman

macrumors Core
Oct 14, 2008
19,521
19,675
The only instruction set enhancements to ARMv9 involve SVE2, an expansion of SVE. The rest of the spec involves security domains, and the part where AArch32 is optional. How much of that Apple has implemented is unclear, but for the lion's share of programs, ARMv9 offers minimal coding improvements.

If I remember correctly SVE/SVE2 do not require v9, they are optional extensions to v8. Apple already implements an advanced version of ARMv8 and they have dropped 32-bit support a while ago. The security components of v9 are probably the only real “new” things, and it’s unclear to me whether Apple would benefit from them. Sounds like the primary focus is on the server/cloud use.
 
  • Like
Reactions: altaic and Tagbert

Sydde

macrumors 68030
Aug 17, 2009
2,563
7,061
IOKWARDI
If I remember correctly SVE/SVE2 do not require v9

Despite being announced 5 years ago, there is currently no generally available CPU which supports any form of SVE (which excludes the Fugaku supercomputer as well as in-preview platforms like Graviton3). This is set to change with ARM having announced ARMv9 which has SVE2 as the base SIMD instruction set, and ARM announcing support for it on their next generation cores across their entire server (Neoverse) and client (Cortex A/X) line up, expected to become generally available early 2022.

Apparently in v9, SVE2 simply replaces Neon.
 

altaic

macrumors 6502a
Jan 26, 2004
711
484
Despite being announced 5 years ago, there is currently no generally available CPU which supports any form of SVE (which excludes the Fugaku supercomputer as well as in-preview platforms like Graviton3). This is set to change with ARM having announced ARMv9 which has SVE2 as the base SIMD instruction set, and ARM announcing support for it on their next generation cores across their entire server (Neoverse) and client (Cortex A/X) line up, expected to become generally available early 2022.

Apparently in v9, SVE2 simply replaces Neon.
I was just reading that gist yesterday— good info there!

It also briefly talks about Apple’s AMX… One thing to note about AMX is that because it’s currently only used through a library, Apple has the freedom to make architectural changes (including switching to SVE2) without effecting developers. However, by the same token, settling on a standard would lock Apple into it to a certain extent (i.e. once developers find out, some will bypass the library, and codebases in the wild will depend directly on the arch).
 
Last edited:

Sydde

macrumors 68030
Aug 17, 2009
2,563
7,061
IOKWARDI
One thing to note about AMX is that because it’s currently only used through a library, Apple has the freedom to make architectural changes (including switching to SVE2) without affecting developers.

I was reading about CoreML (sort of related to AMX), where some programmers were complaining the they could not control whether a ML operation was being handled by the Neural Engine, the GPU or a CPU core, so having SVE2 capabilities in the ISA facilitates load distribution for more stuff (by making processor cores a better fallback for the specialized hardware).
 

Gerdi

macrumors 6502
Apr 25, 2020
449
301
If I remember correctly SVE/SVE2 do not require v9, they are optional extensions to v8. Apple already implements an advanced version of ARMv8 and they have dropped 32-bit support a while ago. The security components of v9 are probably the only real “new” things, and it’s unclear to me whether Apple would benefit from them. Sounds like the primary focus is on the server/cloud use.

Afaik, only SVE made it into the ARMv8-A as part of the 8.2 extension. SVE2 is only part of ARMv9-A.
 

Gerdi

macrumors 6502
Apr 25, 2020
449
301
I was reading about CoreML (sort of related to AMX), where some programmers were complaining the they could not control whether a ML operation was being handled by the Neural Engine, the GPU or a CPU core, so having SVE2 capabilities in the ISA facilitates load distribution for more stuff (by making processor cores a better fallback for the specialized hardware).

The real issue is, that any 3rd party library, which was developed for other systems will include an SVE2 code path, but no AMX code path. So there is some incentive for Apple to stay compatible with the ARMv9 architecture as far as multiplatform code is concerned.
 
  • Like
Reactions: Gnattu

mr_roboto

macrumors 6502a
Sep 30, 2020
856
1,866
Folks, you shouldn't believe everything you read in a gist from some random dude on the internet. He claims:

"This is set to change with ARM having announced ARMv9 which has SVE2 as the base SIMD instruction set"

Well, we can look up the actual docs. Arm defines Arm v8 in document DDI 0407. Rather than publishing a complete new doc for v9, they published DDI 0608 (Arm®v9-A Supplement for v8-A Arm® Architecture Reference Manual). DDI 0608 states:

B1.1.2 FEAT_SVE2, Scalable Vector Extension version 2
The Scalable Vector Extension version 2 (SVE2) is a superset of SVE that incorporates functionality similar to Advanced SIMD, and other enhancements.
FEAT_SVE2 is OPTIONAL.
This feature is supported in AArch64 state only.
FEAT_SVE2 requires FEAT_SVE.

(note: in Arm documentation-ese, "Advanced SIMD" is NEON.)

So SVE2 is an extension which builds on SVE, and both SVE and SVE2 are optional. NEON remains the baseline SIMD ISA which more or less everything is required to have. (DDI 0407 says NEON can only be left out under special circumstances: "This option is licensed only for implementations targeting specialized markets." I would interpret this to mean that anything outside a tiny embedded microcontroller must implement NEON.)

Also, the idea that NEON could be left out in favor of SVE/SVE2 is kinda... misguided. SVE and SVE2 registers are built on top of NEON registers, after all...
 

leman

macrumors Core
Oct 14, 2008
19,521
19,675
Despite being announced 5 years ago, there is currently no generally available CPU which supports any form of SVE (which excludes the Fugaku supercomputer as well as in-preview platforms like Graviton3). This is set to change with ARM having announced ARMv9 which has SVE2 as the base SIMD instruction set, and ARM announcing support for it on their next generation cores across their entire server (Neoverse) and client (Cortex A/X) line up, expected to become generally available early 2022.

Apparently in v9, SVE2 simply replaces Neon.

But it’s not like ARMv9 deprecates Neon, right?

The real issue is, that any 3rd party library, which was developed for other systems will include an SVE2 code path, but no AMX code path. So there is some incentive for Apple to stay compatible with the ARMv9 architecture as far as multiplatform code is concerned.

AMX is not publicly exposed and not documented, so it’s not a problem. The only supported war to use AMX is via Apple’s libraries. If you nevertheless decide to include reverse-engineered AMX code in your app it’s fully in you.
 

Gerdi

macrumors 6502
Apr 25, 2020
449
301
AMX is not publicly exposed and not documented, so it’s not a problem. The only supported war to use AMX is via Apple’s libraries. If you nevertheless decide to include reverse-engineered AMX code in your app it’s fully in you.

I did not say, that AMX is a problem per se nor did I assume 3rd parties using AMX - for my argument the existence of AMX is irrelevant. I said, that not supporting standard extensions, which are part of ARMv9-A, like SVE2 or SME (scalable matrix extensions) is a problem.
SME code does not transform itself into AMX code, when running on Apple Silicon.
 
Last edited:

leman

macrumors Core
Oct 14, 2008
19,521
19,675
I did not say, that AMX is a problem per se nor did I assume 3rd parties using AMX - for my argument the existence of AMX is irrelevant. I said, that not supporting standard extensions, which are part of ARMv9-A, like SVE2 or SME (scalable matrix extensions) is a problem.
SME code does not transform itself into AMX code, when running on Apple Silicon.

Ah, sorry, I misunderstood. You are right of course.
 

BenRacicot

macrumors member
Aug 28, 2010
80
45
Providence, RI
Are you, like, serious?

Instruction sets are not tied to fabrication nodes.
Lolz I was, like, actually asking.

And not just because I was wondering if the fab would deny the upgrade to V9 but because we are in fact hearing that the M2 series chips will be on 5nm.


But thank you for answering my question, that’s how I learn new things from people far smarter than I.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.