RFR: 8315024: Vector API FP reduction tests should not test for exact equality [v2]

Emanuel Peter epeter at openjdk.org
Tue Oct 17 07:11:24 UTC 2023


On Tue, 17 Oct 2023 07:04:10 GMT, Gergö Barany <gbarany at openjdk.org> wrote:

>> @gergo- I just looked at it again. It looks better.
>> 
>> Still, I have a concern about `cornerCaseValues`: Does the result not always degenerate to zero / NaN now?
>> Every 17th value is a corner-case. And there, we mix in all of the special cases deterministically (zero, infty, min/max, NaN), depending on INT/FP type. But it seems that way we always have a NaN in the FP array - and therefore the reduction would always be NaN. Similar things happen with int-multiplication and zero.
>> 
>> I wonder if it would not be better to generate some data randomly, and throw in the special-cases with a very low probability. Maybe 50% that any show up, and then randomly pick one or more special case values. That way you can test the different special-cases separately. And their position could also be random.
>> 
>> BTW: is there any wiki about the template file format, and how to "compile" it to java? I might want to use it in the future myself :)
>
> Thanks for the review @eme64 !

@gergo- You should only integrate once you have 2 reviewers (unless your changes are trivial, and this is not exactly trivial).
Nothing bad happened, since you need a sponsor anyway.

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

PR Comment: https://git.openjdk.org/jdk/pull/16024#issuecomment-1765797757


More information about the hotspot-compiler-dev mailing list