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

Introduce AVX2 target_feature boundary in x4 sampling #719

Merged
merged 26 commits into from
Dec 19, 2024
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
4019b3a
sampling avx2
franziskuskiefer Dec 9, 2024
56c4664
Select x4 Ring Element Sampler via enum
jschneider-bensch Dec 16, 2024
2b2e4e8
Remove obsolete comment
jschneider-bensch Dec 16, 2024
199e786
Remove obsolete `unsafe` exceptions
jschneider-bensch Dec 16, 2024
7537f2b
Some documentation around `SampleArgs`
jschneider-bensch Dec 16, 2024
2295486
Use trait for Sampler instead of enum
jschneider-bensch Dec 17, 2024
7329f77
C Extraction Update
jschneider-bensch Dec 17, 2024
192edaf
Avoid iterator
jschneider-bensch Dec 17, 2024
29b8c97
Update C extraction
jschneider-bensch Dec 17, 2024
fab0db3
Fix Neon sampling
jschneider-bensch Dec 18, 2024
656df9f
Breaking up `SampleArgs` for hax
jschneider-bensch Dec 18, 2024
aecb2cd
No call to `core::cmp::min`
jschneider-bensch Dec 18, 2024
ea89019
Avoid array operations
jschneider-bensch Dec 18, 2024
a3dba9d
Update C extraction
jschneider-bensch Dec 18, 2024
95c30a2
Use `opaque` instead of `opaque_type`
jschneider-bensch Dec 18, 2024
a9714a4
Update hax extraction
jschneider-bensch Dec 18, 2024
3cbb16f
Format
jschneider-bensch Dec 18, 2024
0c697cb
Missing FStar extractions
jschneider-bensch Dec 18, 2024
5dab102
Merge branch 'main' into franziskus/mldsa-samplev3
jschneider-bensch Dec 18, 2024
c6c0198
FStar extraction update
jschneider-bensch Dec 18, 2024
5d83c54
C extraction update
jschneider-bensch Dec 18, 2024
b23ff38
Use array instead of tuple
jschneider-bensch Dec 18, 2024
6f3e276
Update FStar extraction
jschneider-bensch Dec 18, 2024
00424f6
Fix hax extraction
jschneider-bensch Dec 18, 2024
1b690c7
C extraction update
jschneider-bensch Dec 18, 2024
8c00dbf
Address review comments
jschneider-bensch Dec 19, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Libcrux_intrinsics.Arm64_extract
#set-options "--fuel 0 --ifuel 1 --z3rlimit 15"
#set-options "--fuel 0 --ifuel 1 --z3rlimit 80"
open Core
open FStar.Mul

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Libcrux_intrinsics.Arm64_extract
#set-options "--fuel 0 --ifuel 1 --z3rlimit 15"
#set-options "--fuel 0 --ifuel 1 --z3rlimit 80"
open Core
open FStar.Mul

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Libcrux_intrinsics.Avx2_extract
#set-options "--fuel 0 --ifuel 1 --z3rlimit 15"
#set-options "--fuel 0 --ifuel 1 --z3rlimit 80"
open Core
open FStar.Mul

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Libcrux_intrinsics.Avx2_extract
#set-options "--fuel 0 --ifuel 1 --z3rlimit 15"
#set-options "--fuel 0 --ifuel 1 --z3rlimit 80"
open Core
open FStar.Mul

Expand Down
4 changes: 3 additions & 1 deletion libcrux-ml-dsa/cg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ files:
include_in_h:
- '"intrinsics/libcrux_intrinsics_avx2.h"'
api:
patterns:
patterns:
- [libcrux_ml_dsa, samplex4, avx2, "*"]
- [libcrux_ml_dsa, simd, avx2, "*"]
- [libcrux_ml_dsa, hash_functions, simd256, "*"]
- [libcrux_ml_dsa, ml_dsa_65, avx2, "*"]
Expand All @@ -76,6 +77,7 @@ files:
api:
patterns:
- [libcrux_ml_dsa, "*"]
- [libcrux_ml_dsa, samplex4, portable, "*"]
- [libcrux_ml_dsa, simd, "*"]
- [libcrux_ml_dsa, hash_functions, portable, "*"]
- [libcrux_ml_dsa, ml_dsa_65, portable, "*"]
Expand Down
2 changes: 1 addition & 1 deletion libcrux-ml-dsa/cg/code_gen.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ Charon: a68994d00017b76a805d0115ca06c1f2c1805e79
Eurydice: b665364a6d86749566ce2d650d13fa12c8fab2c5
Karamel: 96572bc631fde691a2aea7bce5a5a3838b3a5968
F*: b0961063393215ca65927f017720cb365a193833-dirty
Libcrux: d4b51bcb3af12fb1358ed37830e33cbd72d31590
Libcrux: 00424f6ff03ac7c79f2922ed628bf6a5b8723be3
2 changes: 1 addition & 1 deletion libcrux-ml-dsa/cg/header.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@
* Eurydice: b665364a6d86749566ce2d650d13fa12c8fab2c5
* Karamel: 96572bc631fde691a2aea7bce5a5a3838b3a5968
* F*: b0961063393215ca65927f017720cb365a193833-dirty
* Libcrux: d4b51bcb3af12fb1358ed37830e33cbd72d31590
* Libcrux: 00424f6ff03ac7c79f2922ed628bf6a5b8723be3
*/
14 changes: 7 additions & 7 deletions libcrux-ml-dsa/cg/libcrux_core.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* Eurydice: b665364a6d86749566ce2d650d13fa12c8fab2c5
* Karamel: 96572bc631fde691a2aea7bce5a5a3838b3a5968
* F*: b0961063393215ca65927f017720cb365a193833-dirty
* Libcrux: 87497297c8d9a6be6127d9daae13a942b5439e74
* Libcrux: 00424f6ff03ac7c79f2922ed628bf6a5b8723be3
*/

#ifndef __libcrux_core_H
Expand Down Expand Up @@ -139,11 +139,11 @@ typedef struct libcrux_ml_dsa_ml_dsa_65_MLDSA65Signature_s {
This function found in impl {libcrux_ml_dsa::types::MLDSASignature<SIZE>#4}
*/
/**
A monomorphic instance of libcrux_ml_dsa.types.as_raw_8f
A monomorphic instance of libcrux_ml_dsa.types.as_ref_8f
with const generics
- SIZE= 3309
*/
static inline uint8_t *libcrux_ml_dsa_types_as_raw_8f_fa(
static inline uint8_t *libcrux_ml_dsa_types_as_ref_8f_fa(
libcrux_ml_dsa_ml_dsa_65_MLDSA65Signature *self) {
return self->value;
}
Expand Down Expand Up @@ -216,11 +216,11 @@ This function found in impl
{libcrux_ml_dsa::types::MLDSAVerificationKey<SIZE>#2}
*/
/**
A monomorphic instance of libcrux_ml_dsa.types.as_raw_66
A monomorphic instance of libcrux_ml_dsa.types.as_ref_66
with const generics
- SIZE= 1952
*/
static inline uint8_t *libcrux_ml_dsa_types_as_raw_66_97(
static inline uint8_t *libcrux_ml_dsa_types_as_ref_66_97(
libcrux_ml_dsa_types_MLDSAVerificationKey_ea *self) {
return self->value;
}
Expand Down Expand Up @@ -369,11 +369,11 @@ typedef struct libcrux_ml_dsa_types_MLDSASigningKey_22_s {
This function found in impl {libcrux_ml_dsa::types::MLDSASigningKey<SIZE>}
*/
/**
A monomorphic instance of libcrux_ml_dsa.types.as_raw_9b
A monomorphic instance of libcrux_ml_dsa.types.as_ref_9b
with const generics
- SIZE= 4032
*/
static inline uint8_t *libcrux_ml_dsa_types_as_raw_9b_09(
static inline uint8_t *libcrux_ml_dsa_types_as_ref_9b_09(
libcrux_ml_dsa_types_MLDSASigningKey_22 *self) {
return self->value;
}
Expand Down
Loading
Loading