Register blocking using Vector API.
Paul Sandoz
paul.sandoz at oracle.com
Fri May 10 20:14:37 UTC 2024
Hi,
They are reasonable questions.
If the number of live vector instances used exceeds the number of vector registers available for the compiled application code then the compiler will spill the vectors registers on the stack i.e., same behavior as non-vector registers.
There are no plans to implement such explicit register blocking.
The closest I got to this was prototyping a matrix multiply kernel, where Hotspot’s register allocator managed to do quite a good job, and where IIRC it could not fully eliminate all the bounds checks. See attached,
Paul.
> On May 9, 2024, at 11:07 PM, Andrii Lomakin <andrii0lomakin at gmail.com> wrote:
>
> Hi guys.
> My question is probably naive, but I decided to ask it.
>
> Is it possible to implement so-called register blocking using the current Vector API?
> Is it possible, for example, to create 12 FloatVectors as an indexed array?
> If not, are there any plans to implement this feature on the API level, for example?
>
> What happens if the number of vectors exceeds the number of SIMD registers?
> If, for example, I have 10 SIMD registers but created 12 vector instances as variables, how will that be processed?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/panama-dev/attachments/20240510/0473aa97/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TestKernel.java
Type: application/octet-stream
Size: 5549 bytes
Desc: TestKernel.java
URL: <https://mail.openjdk.org/pipermail/panama-dev/attachments/20240510/0473aa97/TestKernel-0001.java>
More information about the panama-dev
mailing list