Intel AMX and feature detection
John Rose
john.r.rose at oracle.com
Wed Jun 26 02:51:25 UTC 2024
On 25 Jun 2024, at 19:18, Robert Muir wrote:
> On Tue, Jun 25, 2024 at 10:05 PM John Rose <john.r.rose at oracle.com> wrote:
>>
>> On 25 Jun 2024, at 18:51, Robert Muir wrote:
>>
>>> Java VM knows the cpu flags and cpu family, but won't give up the
>>> goods to users like us :)
>>
>> I hear you on this, but is the VM really your only hope?
>>
>> If you were programming in C wouldn’t you grab some C header
>> file and ask a function in there somewhere? And if that’s the
>> case surely there is a way to spin up a Panama FFM access to
>> the same API. Or is that already one of Uwe’s “too hacky”
>> solutions?
>
> Or we could parse /proc/cpuinfo like some other java projects are
> doing for these issues, but then it only works on linux, and Uwe won't
> approve!
>
> I'm just trying to communicate the struggle to get good performance
> and still try to be "portable", it is not easy.
It’s inherently hard given the vagaries of VPUs out there, even
from a single vendor. I’m encouraged, frankly amazed, that we have
as much portability as we do.
> The vector API could theoretically solve it for us too, maybe by
> making SPECIES_PREFERRED more fine-grained, rather than just set to
> "512" for everything. On such machines, for some vector operations,
> "512" is really not the "preferred" size because it causes bad
> performance side effects.
I think we should consider setting the SPECIES_PREFERRED to 256 bits on
machines that support 512 but are known (somehow) to down-clock when 512
is used. That might disappoint a different but smaller set of users.
Any advice on this?
More information about the panama-dev
mailing list