Re: Peculiar Win/11 Behavior?
"Yuri Davidovsky (as work at disclosure dot ie)" <[email protected]>
| Newsgroups | gmane.lisp.lispworks.general |
|---|---|
| Message-ID | <[email protected]> |
On 21 Jan 2025, at 19:36, Syed Zaeem Hosain <[email protected]> wrote: Interesting! Do you know how to access this matrix multiplication functionality in Apple M processors? Is there a library or API call? Apple keeps this co-processor for its private use (same as the neural engine, really) but people have managed to reverse engineer it to find the AMX instruction set used to control it. It appeared first in M1 and no-one was sure if it was there to stay, but as of M4 it seems like it is still there: corsix/amx: Apple AMX Instruction Set github.com I am not sure if I would use it, as there is still no guarantee that it won’t be removed in the future, and I think the inbuilt gpu might have better performance, but there must be a reason why it is there. Maybe a better flops per watt ratio, I cannot guess, and apple never made any statements on this extension that I know of. I am assuming (am I correct about this assumption?) that compilers will not recognize code that performs a standard matrix multiplication - in any language! I cannot say, to be honest. In theory it may be possible for a C compiler (or any other one) to detect cookie cutter algorithm cases and optimise for them, but I think a better chance to have that accelerated would be to use a language that specifically provides matrix operations, or at least the dot product so you could optimise yourself.
amx.png
(image/png, 101.4 KB) - not displayed