Live data from Hacker News

Undocumented arm64 ISA extension present on the Apple M1

gist.github.com

1–10 of 202 posts

Re: Undocumented arm64 ISA extension present on the Apple M1

#3
post #2

I don't understand the significance of this. Could someone who does add some context?

From what I can tell reading this: the Accelerate framework from Apple seems to use custom instructions possibly unique to the M1 chip but potentially similar to Intel AMX. Accelerate is, as I sort of understand it- a way to do advanced math in a very quick / power efficient way. It is touted as deeply integrated with Apple processors from the day it launched and (I think) even recommended to be used over SIMD and the sort (I could certainly be very wrong about this). It dove tails with some of the machine learning work Apple did as well, is portable among Apple systems, and can be assumed to be optimized.

Ninja edit: I’ve not seen how it was achieved until now, but a custom ISA extension isn’t wholly surprising.

Edit 2: as for why this is significant.. I’m not sure it is. It is interesting to know how Accelerate can pull off what it does though. IIRC there are other machine learning frameworks which take advantage of the neural engine- but Accelerate possibly doesn’t- despite having machine learning capabilities.

Re: Undocumented arm64 ISA extension present on the Apple M1

#4
post #2

I don't understand the significance of this. Could someone who does add some context?

From what I can tell reading this: the Accelerate framework from Apple seems to use custom instructions possibly unique to the M1 chip but potentially similar to Intel AMX. Accelerate is, as I sort of understand it- a way to do advanced math in a very quick / power efficient way. It is touted as deeply integrated with Apple processors from the day it launched and (I think) even recommended to be used over SIMD and th…

It also means that any binaries built to use those instructions won't run on any non-Apple ARM64 CPUs, at least not easily. Sort of like how early-era Intel Hackintosh users had to have CPUs with SSE3 support or wait/hope for SSE2 patches.

Re: Undocumented arm64 ISA extension present on the Apple M1

#5
post #2

I don't understand the significance of this. Could someone who does add some context?

From my limited understanding: it looks like a matrix coprocessor, and implies that hardware-accelerated matrix processing has been built into the M1.

Matrix processing comes in useful for AI/ML/CV-type applications. It's something GPUs are generally very good for.

Re: Undocumented arm64 ISA extension present on the Apple M1

#6
post #4

Earlier quoted context omitted.

From what I can tell reading this: the Accelerate framework from Apple seems to use custom instructions possibly unique to the M1 chip but potentially similar to Intel AMX. Accelerate is, as I sort of understand it- a way to do advanced math in a very quick / power efficient way. It is touted as deeply integrated with Apple processors from the day it launched and (I think) even recommended to be used over SIMD and th…

It also means that any binaries built to use those instructions won't run on any non-Apple ARM64 CPUs, at least not easily. Sort of like how early-era Intel Hackintosh users had to have CPUs with SSE3 support or wait/hope for SSE2 patches.

I’m relatively sure that Accelerate does work fine on intel processors and is still the recommended means of doing heavy math. But that could just be because they knew of this eventual future. I’m not sure what Accelerate does under the hood for intel machines. But I would assume perhaps falls back to whatever intel might support.

Re: Undocumented arm64 ISA extension present on the Apple M1

#7
post #2

I don't understand the significance of this. Could someone who does add some context?

In the bigger picture Apple aren't really documenting anything for their new toys, which is not the end of the world but is a huge step back for openness. There is - as far as I can see - no long-form documentation for M1 other than patents.

I already refuse to own apple products so I don't really have any skin in the game, but consider that if microsoft were like this the blind eye would not be turned - buy our new product, everything you run is up to us, we won't document it, maybe we'll upstream the compiler, tough shit.

The fact that they can be like this is really proof that their market position is much stronger than most HNers seem to think it is.

Re: Undocumented arm64 ISA extension present on the Apple M1

#8
post #2

I don't understand the significance of this. Could someone who does add some context?

Apple added custom instructions on top of the ARM instruction set to do matrix operations.

Matrix operations are used a lot in some algorithms, such as in computer graphics and machine learning and these instructions help those operations go faster.

Although the ARM ISA has a multiply and accumulate instruction, it would take many more instructions on a standard ARM core to compute a matrix with only standard instructions. That enables the M1 chip to be faster in this case when developers use these instructions in their applications.

Re: Undocumented arm64 ISA extension present on the Apple M1

#9
post #7
post #2

I don't understand the significance of this. Could someone who does add some context?

In the bigger picture Apple aren't really documenting anything for their new toys, which is not the end of the world but is a huge step back for openness. There is - as far as I can see - no long-form documentation for M1 other than patents. I already refuse to own apple products so I don't really have any skin in the game, but consider that if microsoft were like this the blind eye would not be turned - buy our new…

The implication I assume that there would be pushback on Microsoft for doing the same would be because of the possibility of nefarious undocumented changes. What possibly nefarious things could an undocumented ISA extension do?

Re: Undocumented arm64 ISA extension present on the Apple M1

#10
post #7
post #2

I don't understand the significance of this. Could someone who does add some context?

In the bigger picture Apple aren't really documenting anything for their new toys, which is not the end of the world but is a huge step back for openness. There is - as far as I can see - no long-form documentation for M1 other than patents. I already refuse to own apple products so I don't really have any skin in the game, but consider that if microsoft were like this the blind eye would not be turned - buy our new…

>The fact that they can be like this is really proof that their market position is much stronger than most HNers seem to think it is.

Elsewhere on the HN front page is a computer made with a Russian internal CPU. The CPU has a custom ISA based on x86, and isn't open. The documentation is poor, and nobody has the source code for the compiler. It's also about 5 years behind the state of the art in x86. How can a product like this exist? Easy. Russia needs them for military hardware because they're not going to put Intel in their defense radar systems. The manufacturer has a niche to sell to.

Instead of being 5 years behind, Apple's closed and undocumented ISA is 2 years ahead. How much moreso, if the Russian CPU can survive in the market, can they.

Post reply on HN