-
Notifications
You must be signed in to change notification settings - Fork 150
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(gpu): implement vector comparisons gpu
- Loading branch information
1 parent
70ff0f7
commit 4f0caef
Showing
9 changed files
with
662 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
tfhe/src/integer/gpu/server_key/radix/tests_signed/test_vector_comparisons.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
use crate::integer::gpu::server_key::radix::tests_unsigned::{ | ||
create_gpu_parameterized_test, GpuFunctionExecutor, | ||
}; | ||
use crate::integer::gpu::CudaServerKey; | ||
use crate::integer::server_key::radix_parallel::tests_signed::test_vector_comparisons::{ | ||
default_all_eq_slices_test_case, unchecked_all_eq_slices_test_case, | ||
}; | ||
use crate::shortint::parameters::*; | ||
|
||
create_gpu_parameterized_test!(integer_signed_unchecked_all_eq_slices_test_case); | ||
create_gpu_parameterized_test!(integer_signed_default_all_eq_slices_test_case); | ||
|
||
fn integer_signed_unchecked_all_eq_slices_test_case<P>(param: P) | ||
where | ||
P: Into<PBSParameters>, | ||
{ | ||
let executor = GpuFunctionExecutor::new(&CudaServerKey::unchecked_all_eq_slices); | ||
unchecked_all_eq_slices_test_case(param, executor); | ||
} | ||
|
||
fn integer_signed_default_all_eq_slices_test_case<P>(param: P) | ||
where | ||
P: Into<PBSParameters>, | ||
{ | ||
let executor = GpuFunctionExecutor::new(&CudaServerKey::all_eq_slices); | ||
default_all_eq_slices_test_case(param, executor); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
tfhe/src/integer/gpu/server_key/radix/tests_unsigned/test_vector_comparisons.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
use crate::integer::gpu::server_key::radix::tests_unsigned::{ | ||
create_gpu_parameterized_test, GpuFunctionExecutor, | ||
}; | ||
use crate::integer::gpu::CudaServerKey; | ||
use crate::shortint::parameters::*; | ||
|
||
use crate::integer::server_key::radix_parallel::tests_unsigned::test_vector_comparisons::{ | ||
default_all_eq_slices_test_case, unchecked_all_eq_slices_test_case, | ||
unchecked_slice_contains_test_case, | ||
}; | ||
|
||
create_gpu_parameterized_test!(integer_unchecked_all_eq_slices_test_case); | ||
create_gpu_parameterized_test!(integer_default_all_eq_slices_test_case); | ||
create_gpu_parameterized_test!(integer_unchecked_contains_slice_test_case); | ||
|
||
fn integer_unchecked_all_eq_slices_test_case<P>(param: P) | ||
where | ||
P: Into<PBSParameters>, | ||
{ | ||
let executor = GpuFunctionExecutor::new(&CudaServerKey::unchecked_all_eq_slices); | ||
unchecked_all_eq_slices_test_case(param, executor); | ||
} | ||
|
||
fn integer_default_all_eq_slices_test_case<P>(param: P) | ||
where | ||
P: Into<PBSParameters>, | ||
{ | ||
let executor = GpuFunctionExecutor::new(&CudaServerKey::all_eq_slices); | ||
default_all_eq_slices_test_case(param, executor); | ||
} | ||
|
||
fn integer_unchecked_contains_slice_test_case<P>(param: P) | ||
where | ||
P: Into<PBSParameters>, | ||
{ | ||
let executor = GpuFunctionExecutor::new(&CudaServerKey::unchecked_contains_sub_slice); | ||
unchecked_slice_contains_test_case(param, executor); | ||
} |
Oops, something went wrong.