[lworld+fp16] RFR: 8333852: Allow flat array layout for value based classes. [v2]
Bhavana Kilambi
bkilambi at openjdk.org
Thu Jul 4 07:43: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
Looks good to me. Tested on FP16 supporting aarch64 machine and can see FP16 add operation getting auto-vectorized now. Thanks for this patch.
-------------
Marked as reviewed by bkilambi (no project role).
PR Review: https://git.openjdk.org/valhalla/pull/1154#pullrequestreview-2158208590
More information about the valhalla-dev
mailing list