RFR: 8346954: [JMH] jdk.incubator.vector.MaskedLogicOpts fails due to IndexOutOfBoundsException
Nicole Xu
duke at openjdk.org
Mon Feb 17 06:44:11 UTC 2025
On Thu, 13 Feb 2025 12:09:43 GMT, Jatin Bhateja <jbhateja at openjdk.org> wrote:
>> test/micro/org/openjdk/bench/jdk/incubator/vector/MaskedLogicOpts.java line 122:
>>
>>> 120: @Setup(Level.Invocation)
>>> 121: public void init_per_invoc() {
>>> 122: int512_arr_idx = (int512_arr_idx + 16) & (ARRAYLEN-1);
>>
>> Benchmark assumes that ARRAYLEN is a POT value, thus it will also be good to use the modulous operator for rounding here, it will be expensive but will not impact the performance of the Benchmarking kernels.
>
> Please try with following command line
> `java -jar target/benchmarks.jar -f 1 -i 2 -wi 1 -w 30 -p ARRAYLEN=30 MaskedLogic`
Thanks for pointing that out. Typically, ARRAYLEN is almost always a POT value, which is also assumed by many other benchmarks. Are we realistically going to test with an ARRAYLEN of 30?
I think the POT assumption is reasonable for our purposes.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22963#discussion_r1957691283
More information about the core-libs-dev
mailing list