3 ms·
Apple might use these instruction in CoreML/Accelerate Framework and not integrated to LLVM as the author said: > This is an undocumented arm64 ISA extension p
by ytch 6y ago
Apple might use these instruction in CoreML/Accelerate Framework and not integrated to LLVM as the author said:
> This is an undocumented arm64 ISA extension present on the Apple M1. These instructions have been reversed from Accelerate (vImage, libBLAS, libBNNS, libvDSP and libLAPACK all use them),
So we still cannot understand all of them from LLVM source code.
- floatingatoll 6y agoTo highlight where we're disconnected, my phrase: "cases that use these instructions will be compiled by Xcode" does not imply that Xcode comes equipped to translate user-provided code into these instructions; however, by use of Apple frameworks, Xcode could still regardless output binaries that use these instructions, without needing to provide us any manner to do so ourselves. I suspect most people aren't compiling framework-provided binary code into their binaries, using static or whatever it's called these days and so I believe those usages will end up reserved for the frameworks — but since someone is certain to try and consider 'the binary output of Xcode' to include any frameworks referenced by it if it supports their point, I'm taking care to cover all possible cases where output of those instructions could occur without a translation phase using LLVM or etc.
- ytch 6y agoThanks for your explanation, I didn't take this into account
- floatingatoll 6y agoNo worries, I’ll think about how to do better with my wording next time too.
- rodgerd 6y agoIt's interesting, in as much as there's been a constant bickering around whether the GPL vs Apache license for GCC and llvm means anything; to date, there general view has been that there's no evidence of anyone using LLVM to build compilers with closed extensions that are not released to the community; this is perhaps the first case of that.
- gsnedders 6y agoIs there any evidence that Apple has an LLVM compiler with these extensions, versus using asm blocks within the Accelerate library source? There's certainly prior cases of Apple shipping branches of LLVM (most notably adding arm64 support, which took about half a year to merge in upstream), but the mere existence of these instructions is little evidence of any branch?
- floatingatoll 6y agoI have heard of none, though I do not speak for others.
- saagarjha 6y agoNo idea what the story is with AMX instructions, but Apple has been shipping an arm64e compiler for quite a while with changes that have not been upstreamed.