-
Notifications
You must be signed in to change notification settings - Fork 38
Reintroduce struct definitions for mlk_poly{mat,vec} #1263
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
base: main
Are you sure you want to change the base?
Conversation
f300f02 to
f18ce9f
Compare
32c1493 to
3dc4b2c
Compare
3dc4b2c to
332a785
Compare
|
The runtime of |
e9256dd to
478f245
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mac Mini (M1, 2020) benchmarks
| Benchmark suite | Current: 500213c | Previous: 403daac | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-512 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-512 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-768 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 decaps |
0 cycles |
0 cycles |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intel Xeon 4th gen (c7i)
| Benchmark suite | Current: 500213c | Previous: 403daac | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-512 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-512 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-768 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 decaps |
0 cycles |
0 cycles |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intel Xeon 4th gen (c7i) (no-opt)
| Benchmark suite | Current: 500213c | Previous: 403daac | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-512 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-512 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-768 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 decaps |
0 cycles |
0 cycles |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
oqs-bot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Intel Xeon 4th gen (c7i) (no-opt)'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.03.
| Benchmark suite | Current: 478f245 | Previous: 90fed62 | Ratio |
|---|---|---|---|
ML-KEM-512 encaps |
36417 cycles |
35123 cycles |
1.04 |
ML-KEM-1024 encaps |
85851 cycles |
83296 cycles |
1.03 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arm Cortex-A72 (Raspberry Pi 4) benchmarks
| Benchmark suite | Current: 500213c | Previous: 403daac | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-512 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-512 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-768 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 decaps |
0 cycles |
0 cycles |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AMD EPYC 4th gen (c7a)
| Benchmark suite | Current: 500213c | Previous: 403daac | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-512 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-512 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-768 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 decaps |
0 cycles |
0 cycles |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AMD EPYC 3rd gen (c6a)
| Benchmark suite | Current: 500213c | Previous: 403daac | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-512 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-512 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-768 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 decaps |
0 cycles |
0 cycles |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Graviton2
| Benchmark suite | Current: 500213c | Previous: 403daac | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-512 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-512 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-768 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 decaps |
0 cycles |
0 cycles |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Graviton4
| Benchmark suite | Current: 500213c | Previous: 403daac | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-512 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-512 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-768 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 decaps |
0 cycles |
0 cycles |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AMD EPYC 4th gen (c7a) (no-opt)
| Benchmark suite | Current: 500213c | Previous: 403daac | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-512 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-512 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-768 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 decaps |
0 cycles |
0 cycles |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AMD EPYC 3rd gen (c6a) (no-opt)
| Benchmark suite | Current: 500213c | Previous: 403daac | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-512 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-512 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-768 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 decaps |
0 cycles |
0 cycles |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
oqs-bot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'AMD EPYC 3rd gen (c6a) (no-opt)'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.03.
| Benchmark suite | Current: 478f245 | Previous: 90fed62 | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
39857 cycles |
38475 cycles |
1.04 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intel Xeon 3rd gen (c6i)
| Benchmark suite | Current: 500213c | Previous: 403daac | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-512 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-512 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-768 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 decaps |
0 cycles |
0 cycles |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
oqs-bot
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
⚠️ Performance Alert ⚠️
Possible performance regression was detected for benchmark 'Intel Xeon 3rd gen (c6i)'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.03.
| Benchmark suite | Current: 478f245 | Previous: 90fed62 | Ratio |
|---|---|---|---|
ML-KEM-768 decaps |
41443 cycles |
39363 cycles |
1.05 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Graviton4 (no-opt)
| Benchmark suite | Current: 500213c | Previous: 403daac | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-512 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-512 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-768 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 decaps |
0 cycles |
0 cycles |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Graviton3
| Benchmark suite | Current: 500213c | Previous: 403daac | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-512 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-512 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-768 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 decaps |
0 cycles |
0 cycles |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Graviton2 (no-opt)
| Benchmark suite | Current: 500213c | Previous: 403daac | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-512 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-512 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-768 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 decaps |
0 cycles |
0 cycles |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Intel Xeon 3rd gen (c6i) (no-opt)
| Benchmark suite | Current: 500213c | Previous: 403daac | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-512 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-512 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-768 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 decaps |
0 cycles |
0 cycles |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Graviton3 (no-opt)
| Benchmark suite | Current: 500213c | Previous: 403daac | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-512 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-512 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-768 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 decaps |
0 cycles |
0 cycles |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arm Cortex-A55 (Snapdragon 888) benchmarks
| Benchmark suite | Current: 500213c | Previous: 403daac | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-512 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-512 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-768 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 decaps |
0 cycles |
0 cycles |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Arm Cortex-A76 (Raspberry Pi 5) benchmarks
| Benchmark suite | Current: 500213c | Previous: 403daac | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-512 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-512 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-768 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 decaps |
0 cycles |
0 cycles |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SpacemiT K1 8 (Banana Pi F3) benchmarks
| Benchmark suite | Current: 500213c | Previous: 403daac | Ratio |
|---|---|---|---|
ML-KEM-512 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-512 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-512 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-768 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-768 decaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 keypair |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 encaps |
0 cycles |
0 cycles |
1 |
ML-KEM-1024 decaps |
0 cycles |
0 cycles |
1 |
This comment was automatically generated by workflow using github-action-benchmark.
478f245 to
1b406c3
Compare
- Change mlk_polyvec back to struct `{ mlk_poly vec[MLKEM_K]; }`
- Change mlk_polymat to struct `{ mlk_polyvec vec[MLKEM_K]; }`
- Update all function signatures to use pointer style
- Fix all implementations to use struct member access
- Update tests, benchmarks, and CBMC harnesses
- Add consistent const annotations
Somewhat surprisingly and dissatisfyingly, I could not salvage
the CBMC proof for the 'monolithic' polymat_permute_bitrev_to_custom_native
but had to break it in two functions. It would be good to resolve
this as the split causes a lot of code-overhead for an entirely
trivial function.
Signed-off-by: Hanno Becker <beckphan@amazon.co.uk>
252023d to
500213c
Compare
{ mlk_poly vec[MLKEM_K]; }{ mlk_polyvec vec[MLKEM_K]; }