[lworld+fp16] RFR: 8333852: Allow flat array layout for value based classes. [v2]

Jatin Bhateja jbhateja at openjdk.org
Thu Jul 4 06:49:32 UTC 2024


On Thu, 4 Jul 2024 06:30:00 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:

>> Patch enables flat runtime layout for value based classes decorated with following annotations.
>>   1. @NullRestrictedArray:  Newly added annotation, ensures flat array elements are never assigned a null value during the lifetime of array, a violation to this rule results into a NullPointerException.
>>   2. @ImplicitylConstructible: Ensures default value assignment to flat array element at the time of new allocation.
>>   3. @LooselyConsistentValue:  Relaxes strict atomic update constraint of value objects.
>> 
>> In addition, all primitive box classes when annotated with #1 and #2 assume atomic update since they wrap around primitive type fields.
>> 
>> With this patch, an array of Float16 type has flat runtime layout which enables auto-vectorization of FP16 operations.
>> 
>> Best Regards,
>> Jatin
>
> Jatin Bhateja has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Removing redundant @enablePreview setting

Hi @Bhavana-Kilambi , May I request you for a cursory approval, since you have already confirmed auto-vectorization for FP16 on aarch64.

-------------

PR Comment: https://git.openjdk.org/valhalla/pull/1154#issuecomment-2208237947


More information about the valhalla-dev mailing list