[lworld+fp16] RFR: 8333852: Allow flat array layout for value based classes.
Jatin Bhateja
jbhateja at openjdk.org
Wed Jul 3 15:00:32 UTC 2024
On Wed, 3 Jul 2024 11:51:56 GMT, Bhavana Kilambi <bkilambi 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
>
> test/hotspot/jtreg/compiler/vectorization/TestFloat16VectorSum.java line 46:
>
>> 44:
>> 45: public static void main(String args[]) {
>> 46: TestFramework.runWithFlags("--enable-preview", "-XX:-TieredCompilation", "-Xbatch");
>
> Hi Jatin, thanks for this patch. May I ask, why `-XX:-TieredCompilation` option is passed? It's one of the whitelisted flags and must be already applied when compiling the test isn't it?
Does this test works for you ?
I faced some failure with this test despite of passing --enable-preview, this works in the standalone (non-jtreg) mode though. Somehow --enable-preview option is not being passed while loading one of the test harness class (OutputBuffer) which has preview specific minor version. This could be gap in IR framework, but I need to confirm it.
On your query, white listing filters out passing any non-whitelisted option to IR framework.
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1154#discussion_r1664342468
More information about the valhalla-dev
mailing list