Live data from Hacker News

Undocumented arm64 ISA extension present on the Apple M1

gist.github.com

181–190 of 202 posts

Re: Undocumented arm64 ISA extension present on the Apple M1

#181
post #84

Earlier quoted context omitted.

Yes. Not as much as the average CPU but still documented: https://developer.nvidia.com/blog/nvidia-ampere-architecture...

Where is the native-to-hardware ISA?

Interestingly in Nvidia's case, the CUDA Toolkit ships with nvdisasm, which is a disassembler for the native hardware ISA.

They do not ship an assembler though.

Re: Undocumented arm64 ISA extension present on the Apple M1

#182
It is really unfortunate that the very commonly used numerical/scientific packages Numpy and Scipy removed[1] Apple’s Accelerate framework compatibility this year due to ‘errors in the framework’. It looks like Python users won’t have access to this capability from the M1 based Macs for some time.

[1] https://github.com/numpy/numpy/issues/15947

Re: Undocumented arm64 ISA extension present on the Apple M1

#183

Earlier quoted context omitted.

Say hello to Function Multi-versioning [0]. You tell the compiler to build a version for each march defined in the attribute. When that function is called a quick CPU check (via CPUID) is performed and if there's a version specific to the current CPU that will run instead of the more general implementation. ICC has supported this for a long time and it's widely used in Intel's MKL. LLVM also supports FMV but uses a s…

Note that on ARM it is more annoying to get CPU capabilities as there is no straight cpuid equivalent.

On Apple platforms, CPU capabilities are cached on the commpage, so system libraries don’t even need to use cpuid on x86.

Re: Undocumented arm64 ISA extension present on the Apple M1

#184
post #136

I see undocumented instruction extensions as a special case of private API: it buys Apple the freedom to change the underlying implementation in the future. As long as done in a manner that is not anticompetitive, I don't see the problem.

How do you write a competing BLAS? Presumably, you need to reverse engineer these to be competitive with Apple's solution.

Re: Undocumented arm64 ISA extension present on the Apple M1

#185

Earlier quoted context omitted.

>These are primarily focused on machine learning training where you do backpropagation through huge matrix operations How is this different from normal matrix operations?

Scale, and only scale. As with most extensions, there's negative value if you're doing a small number of calcs, but it pays off in larger needs like ML training. We've been calculating matrixes for time eternal, but AMX has just recently become a thing. Intel just introduced their own AMX instructions.

I don't know, if you want to perform DL inference on 4k/8k video real-time you're gonna need some heavy duty matrix multiplication resources. GPU is great for batched inferences but for quick no-pcie-transfer, small-to-no-batching inferences you want something close to the CPU...

Re: Undocumented arm64 ISA extension present on the Apple M1

#186

Earlier quoted context omitted.

Scale, and only scale. As with most extensions, there's negative value if you're doing a small number of calcs, but it pays off in larger needs like ML training. We've been calculating matrixes for time eternal, but AMX has just recently become a thing. Intel just introduced their own AMX instructions.

I don't know, if you want to perform DL inference on 4k/8k video real-time you're gonna need some heavy duty matrix multiplication resources. GPU is great for batched inferences but for quick no-pcie-transfer, small-to-no-batching inferences you want something close to the CPU...

Then it's good that the A13/A14/M1 have a neural inference engine, the latter featuring 11 trillion operations per second, using shared memory with the CPU.

Re: Undocumented arm64 ISA extension present on the Apple M1

#187

After four different CPU ISA's (68000, powerpc, x86, ARM) an Apple ISA is next.

Apple doesn't really need their own ISA, because they have an architectural ARM license, and complete design knowledge in-house.

Meaning they can do anything they want on an ARM base, they're already not beholden to any third-party designer or roadmap, which is what hampered them with both PPC and x86 (I'm not old enough to remember the 68k and really know why they moved off of it).

The only reason they'd have to move away from ARM is if the ISA ends up preventing them from doing something, somehow.

Re: Undocumented arm64 ISA extension present on the Apple M1

#188

Earlier quoted context omitted.

I don't know, if you want to perform DL inference on 4k/8k video real-time you're gonna need some heavy duty matrix multiplication resources. GPU is great for batched inferences but for quick no-pcie-transfer, small-to-no-batching inferences you want something close to the CPU...

Then it's good that the A13/A14/M1 have a neural inference engine, the latter featuring 11 trillion operations per second, using shared memory with the CPU.

We're talking about INT4/7 or bfloat TOPS, right? And if similar to other neural inference engines, vpus, tpus, etc. it's probably off except for heavy duty stuff and slow to power up again? Whilst repowering a matmul in-cpu block might be faster?

I don't see the need for an effort such as a matmul-dedicated instruction-set elsewhere? What's your guess?

Re: Undocumented arm64 ISA extension present on the Apple M1

#189

Earlier quoted context omitted.

Oracle reproprietized all of Solaris, including the outside contributions up to that point. And I assume that Apple has support for these instructions this whole thread is about in their toolchains, so if that's the same version that's in xcode, reproprietization is already happening. Leaving reproprietization on the table is the whole point of non-copyleft open source.

Solaris was released under a copyleft license (CDDL). How did they do that. When I google it I find your comment as the first result.

They required a copyright assignment as well. They then re licensed everything as proprietary.

https://www.youtube.com/watch?v=-zRN7XLCRhc&t=2281s

Re: Undocumented arm64 ISA extension present on the Apple M1

#190

I hate Apple for that. They very often use non-standard tech and we'll end up with Apple proprietary processors instead of the standard stuff x64/ARM64.

Competitors can't compete with them even with standard stuff. Good for them to move forward. It's funny how innovation becomes a "bad" thing when a company you don't like innovates "too much".

This is not about innovation, this is about standards. Like Objective-C instead of C++, Metal instead of Vulkan, Lightning instead of USB-C, and countless proprietary stuff they use to lock down their users and devs inside of their closed garden.

This is wrong and detrimental to the whole industry, including users.

Apple would have created a shitty internet if they were in charge at the time.

To be honest, Microsoft did pretty nasty things during their era, but I think that Apple would have been so much worse.

Post reply on HN