Skip to content
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

Fixed overflow in large coset NTTs #358

Merged
merged 3 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion icicle/utils/utils_kernels.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ namespace utils_internal {
{
int tid = blockDim.x * blockIdx.x + threadIdx.x;
if (tid < n_elements * batch_size) {
int scalar_id = tid % n_elements;
long scalar_id = tid % n_elements;
jeremyfelder marked this conversation as resolved.
Show resolved Hide resolved
if (bitrev) scalar_id = __brev(scalar_id) >> (32 - logn);
out_vec[tid] = *(scalar_vec + ((scalar_id * step) % n_scalars)) * in_vec[tid];
}
Expand Down
2 changes: 1 addition & 1 deletion wrappers/rust/icicle-core/src/ntt/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ macro_rules! impl_ntt_tests {
(
$field:ident
) => {
const MAX_SIZE: u64 = 1 << 16;
const MAX_SIZE: u64 = 1 << 17;
static INIT: OnceLock<()> = OnceLock::new();

#[test]
Expand Down
4 changes: 2 additions & 2 deletions wrappers/rust/icicle-core/src/ntt/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ where
F::ArkEquivalent: FftField,
<F as FieldImpl>::Config: NTT<F> + GenerateRandom<F>,
{
let test_sizes = [1 << 4, 1 << 16];
let test_sizes = [1 << 4, 1 << 17];
for test_size in test_sizes {
let ark_domain = GeneralEvaluationDomain::<F::ArkEquivalent>::new(test_size).unwrap();

Expand Down Expand Up @@ -161,7 +161,7 @@ where
<F as FieldImpl>::Config: NTT<F> + GenerateRandom<F>,
{
let mut seed = test_rng();
let test_sizes = [1 << 4, 1 << 16];
let test_sizes = [1 << 4, 1 << 17];
for test_size in test_sizes {
let coset_generators = [
F::ArkEquivalent::rand(&mut seed),
Expand Down
Loading