Skip to content

Commit 95863e1

Browse files
committed
chore(gpu): plug in signed gpu tests in the hl api
1 parent a508f4c commit 95863e1

File tree

9 files changed

+771
-694
lines changed

9 files changed

+771
-694
lines changed

tfhe/src/high_level_api/integers/signed/base.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,9 +186,13 @@ where
186186
Self::new(ciphertext, cpu_key.tag.clone())
187187
}
188188
#[cfg(feature = "gpu")]
189-
InternalServerKey::Cuda(_) => {
190-
panic!("Cuda devices does not support abs yet")
191-
}
189+
InternalServerKey::Cuda(cuda_key) => with_thread_local_cuda_streams(|streams| {
190+
let result = cuda_key
191+
.key
192+
.key
193+
.abs(&*self.ciphertext.on_gpu(streams), streams);
194+
Self::new(result, cuda_key.tag.clone())
195+
}),
192196
})
193197
}
194198

0 commit comments

Comments
 (0)