On Thu, 22 Oct 2026 02:24:10 GMT, Volodymyr Paprotski <[email protected]> wrote:
>> This provides AVX2 intrinsics for MLKEM operations. I also refactored AVX512 >> for code sharing. (A lot of this is similar to the MLDSA refactoring I did, >> and general shape follows that design) >> >> Performance: >> - KEMBench.MLKEM.(en|de)capsulate on AVX2 got 50-80% faster (depending on >> keysize and operation) >> - On AVX512, the intrinsics themselves were ~10-30% faster, but it doesnt >> really show on the top-level KEMBench.MLKEM.(en|de)capsulate (other parts of >> the benchmark take over, eg SHA3 which we optimized previously) >> >> --------- >> - [X] I confirm that I make this contribution in accordance with the >> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai). > > Volodymyr Paprotski has updated the pull request with a new target base due > to a merge or a rebase. The pull request now contains eight commits: > > - re-enable test > - Merge remote-tracking branch 'origin/master' into avx2-mlkem > - whitespace > - reduce fuzz test repetition > - Merge remote-tracking branch 'origin/master' into avx2-mlkem > - prepare for rebase > - comments from Anas > - avx2 mlkem drop src/hotspot/cpu/x86/stubGenerator_x86_64_kyber.cpp line 354: > 352: break; > 353: case 0: // final unshuffle for kyberNtt > 354: // reverse case 1: all even are in input1 and odd in input2, > put back Need to say 32 bit quantities here. Why do we need different code for case 0 and case 1? For the 512-bit, case 0 and case 1 have same code. src/hotspot/cpu/x86/stubGenerator_x86_64_kyber.cpp line 421: > 419: break; > 420: // Special cases > 421: case 1: // initial shuffle for kyberInverseNtt case1 and 0 have same code, no need to duplicate. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/33444#discussion_r4567679162 PR Review Comment: https://git.openjdk.org/jdk/pull/33444#discussion_r4568555102
