Skip to content

Commit

Permalink
fix(hlapi): bind missing cuda bitnot
Browse files Browse the repository at this point in the history
  • Loading branch information
tmontaigu committed Feb 14, 2024
1 parent 767e7c4 commit cb42636
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tfhe/src/high_level_api/booleans/base.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1246,7 +1246,7 @@ impl std::ops::Not for &FheBool {
}
#[cfg(feature = "gpu")]
InternalServerKey::Cuda(cuda_key) => with_thread_local_cuda_stream(|stream| {
let inner = cuda_key
let mut inner = cuda_key
.key
.scalar_bitxor(&self.ciphertext.on_gpu(), 1, stream);
inner.info.blocks[0].degree = crate::shortint::ciphertext::Degree::new(1);
Expand Down
7 changes: 4 additions & 3 deletions tfhe/src/high_level_api/integers/unsigned/ops.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1979,9 +1979,10 @@ where
FheUint::new(ciphertext)
}
#[cfg(feature = "gpu")]
InternalServerKey::Cuda(_) => {
panic!("Not '!' is not yet supported by Cuda devices")
}
InternalServerKey::Cuda(cuda_key) => with_thread_local_cuda_stream(|stream| {
let inner_result = cuda_key.key.bitnot(&self.ciphertext.on_gpu(), stream);
FheUint::new(inner_result)
}),
})
}
}

0 comments on commit cb42636

Please sign in to comment.