-
Notifications
You must be signed in to change notification settings - Fork 151
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(gpu): port fix to compression encoding #1903
base: main
Are you sure you want to change the base?
Conversation
If you're new to commit signing, there are different ways to set it up: Sign commits with
|
- Modifies the generation of the LUT used in decompression so that the delta is calculated with a different precision, as in the CPU implementation
d8afa5c
to
8279cd8
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.
looks ok to me
uint32_t input_modulus_sup = input_message_modulus * input_carry_modulus; | ||
uint32_t output_modulus_sup = output_message_modulus * output_carry_modulus; | ||
uint32_t box_size = polynomial_size / input_modulus_sup; | ||
Torus output_delta = (1ul << 63) / output_modulus_sup; |
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 does not work for Torus u32 (don't know if you still support that) also this can overflow as ul (unsigned long) is not guaranteed to be 64 bits
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.
Indeed. Good catch.
We haven't dropped support, although we have no test or active development for u32.
I will fix this.
closes: https://github.com/zama-ai/tfhe-rs-internal/issues/845
PR content/description
Check-list: