Skip to content

Add Rv64v vlen128 NTT - #1875

Open
ishanrk wants to merge 3 commits into
pq-code-package:mainfrom
ishanrk:rv64v-vlen128-ntt
Open

Add Rv64v vlen128 NTT#1875
ishanrk wants to merge 3 commits into
pq-code-package:mainfrom
ishanrk:rv64v-vlen128-ntt

Conversation

@ishanrk

@ishanrk ishanrk commented Aug 23, 2026

Copy link
Copy Markdown

Summary:
add VLEN=128 support to the existing rv64v backend, including forward/inverse NTT and added the switch for VLEN=128 detection in meta.h where it is decided whether to run portable or RVV code.

The VLEN=128 implementation uses a separate NTT schedule (You can pretty much copy the VLEN=256 schedule until the last 3 layers of NTT when the distance between butterflies becomes 8, 4, and 2 and you use slightly different bitswap permutations with LMUL=4).

Do you expect this change to impact performance: Yes/No
YES ONLY FOR RISC-V VLEN = 128

If yes, please provide local benchmarking results.
On a Kendryte K230 the new NTT is roughly 1.7x faster than the existing portable C fallback (~41% fewer cycles).

Signed-off-by: Ishan Kumthekar <ishanrk@protonmail.com>
Signed-off-by: Ishan Kumthekar <ishanrk@protonmail.com>
Signed-off-by: Ishan Kumthekar <ishanrk@protonmail.com>
@ishanrk
ishanrk requested a review from a team as a code owner August 23, 2026 21:39
@ishanrk ishanrk changed the title Rv64v vlen128 ntt Add Rv64v vlen128 ntt Aug 23, 2026
@ishanrk ishanrk changed the title Add Rv64v vlen128 ntt Add Rv64v vlen128 NTT Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant