zama-ai / tfhe-rs

TFHE-rs: A Pure Rust implementation of the TFHE Scheme for Boolean and Integer Arithmetics Over Encrypted Data.
Other
903 stars 143 forks source link

chore(gpu): Add bitnot operation without using pbs #1257

Closed guillermo-oyarzun closed 3 months ago

guillermo-oyarzun commented 3 months ago

closes: please link all relevant issues

PR content/description

Check-list:

guillermo-oyarzun commented 3 months ago

Hey! Thanks a lot for this PR! I see you have modified the content of bitnot_assign_async, but actually you should replace the content of unchecked_bitnot_assign_async with your changes. The unchecked version does not perform the initial carry propagation. 🙂

ahh I followed the CPU implementation. On CPU there is no unchecked_bitnot, maybe we should not have too?

agnesLeroy commented 3 months ago

Hey! Thanks a lot for this PR! I see you have modified the content of bitnot_assign_async, but actually you should replace the content of unchecked_bitnot_assign_async with your changes. The unchecked version does not perform the initial carry propagation. 🙂

ahh I followed the CPU implementation. On CPU there is no unchecked_bitnot, maybe we should not have too?

@tmontaigu is there a reason there is no unchecked_bitnot on the CPU?

tmontaigu commented 3 months ago

No I don't think there is a particular reason

agnesLeroy commented 3 months ago

Ok so @guillermo-oyarzun let's keep the unchecked entry point for the GPU and do the modifications there, I think it's better as it follows the same pattern as the other functions then.