-
Notifications
You must be signed in to change notification settings - Fork 157
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
chore(hlapi): stabilize FheTypes #1786
Conversation
tfhe/src/c_api/high_level_api/mod.rs
Outdated
Type_FheBool, | ||
Type_FheBool = 0, | ||
Type_FheUint2, | ||
Type_FheUint4, | ||
Type_FheUint4 = 1, | ||
Type_FheUint6, | ||
Type_FheUint8, | ||
Type_FheUint8 = 2, | ||
Type_FheUint10, | ||
Type_FheUint12, | ||
Type_FheUint14, |
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.
We need all variants to have a value otherwise we'll have an issue later on, I'll check with BC for that and the fact we have more types than them
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.
we probably need a test (with a macro) to check that all values match between the C Enum and the HL one
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.
Wait why is this the C API enum being updated ?
cdb6d94
to
de4a613
Compare
tfhe/src/high_level_api/mod.rs
Outdated
#[derive(Copy, Clone, PartialEq, Eq, Debug)] | ||
pub enum FheTypes { |
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.
this needs to be marked #[repr(i32)] and all the types need to have a value associated, then we'll check with BC it's fine with them
de4a613
to
08752cd
Compare
tfhe/src/c_api/high_level_api/mod.rs
Outdated
Type_FheInt2, | ||
Type_FheInt4, | ||
Type_FheInt6, |
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.
still missing values here
08752cd
to
725438b
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.
To avoid blocking while I'm away I'm approving, does not mean this should be merged as is
tfhe/src/high_level_api/mod.rs
Outdated
@@ -129,35 +130,37 @@ pub enum Device { | |||
} | |||
|
|||
#[derive(Copy, Clone, PartialEq, Eq, Debug)] | |||
#[repr(i32)] | |||
#[derive(EnumIter)] |
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.
derive only in #[cfg(test)] maybe ? avoids having another mandatory dependency
so #[cfg_attr(test, derive(EnumIter))] I believe
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.
Done
as I approved there was this crash that looks related to the new dependency you added https://github.com/zama-ai/tfhe-rs/actions/runs/12315454529/job/34373751603 |
725438b
to
408f82c
Compare
408f82c
to
bf97bb6
Compare
bf97bb6
to
3513931
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.
This time I'm good with this :)
as long as all is green !
No description provided.