Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CI: Add test for non-standard values of GEN_MATRIX_NBLOCKS #416

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

hanno-becker
Copy link
Contributor

@hanno-becker hanno-becker commented Nov 16, 2024

GEN_MATRIX_NBLOCKS is a heuristic value estimating the amount of rejection sampling input to sample 256 polynomial coefficients.

While this value is hardcoded to 3 by default, one should be able to set it to any positive value. Moreover, some code-paths are not as easily reached with the default value, and testing a lower value increases the chances of catching bugs in those.

This commit allows the user to specify GEN_MATRIX_NBLOCKS in the CFLAGS, and extends the CI to test the non-standard values 1,2, and 4.

@hanno-becker hanno-becker force-pushed the gen_nmatrix_blocks_test branch 4 times, most recently from 5f57c42 to 244f947 Compare November 16, 2024 21:37
@hanno-becker hanno-becker force-pushed the gen_nmatrix_blocks_test branch from 244f947 to 9bd1bcb Compare November 18, 2024 18:46
Copy link
Contributor

@mkannwischer mkannwischer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Please add a comment in the CI config - I won't remember why we need this in a few months.

.github/workflows/ci.yml Show resolved Hide resolved
mlkem/indcpa.c Outdated Show resolved Hide resolved
@hanno-becker hanno-becker force-pushed the gen_nmatrix_blocks_test branch from 9bd1bcb to 2d5f4a8 Compare November 19, 2024 14:35
GEN_MATRIX_NBLOCKS is a heuristic value estimating the amount of
rejection sampling input to sample 256 polynomial coefficients.

While this value is hardcoded to 3 by default, one should be able
to set it to any positive value. Moreover, some code-paths are not
as easily reached with the default value, and testing a lower value
increases the chances of catching bugs in those.

This commit allows the user to specify GEN_MATRIX_NBLOCKS in the
CFLAGS, and extends the CI to test the non-standard values 1,2, and 4.

Signed-off-by: Hanno Becker <[email protected]>
@hanno-becker hanno-becker force-pushed the gen_nmatrix_blocks_test branch from 2d5f4a8 to a75a08b Compare November 19, 2024 14:36
@hanno-becker hanno-becker force-pushed the gen_nmatrix_blocks_test branch from a75a08b to 46f496f Compare November 19, 2024 15:16
@hanno-becker hanno-becker merged commit 798844c into main Nov 19, 2024
36 checks passed
@hanno-becker hanno-becker deleted the gen_nmatrix_blocks_test branch November 19, 2024 16:25
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.

Add test for non-standard values of GEN_MATRIX_NBLOCKS
2 participants