Skip to content

Commit

Permalink
ntt/*: omit radix6_twiddles_12.
Browse files Browse the repository at this point in the history
  • Loading branch information
dot-asm committed Jan 28, 2025
1 parent ce5854c commit cb1bc09
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 23 deletions.
9 changes: 0 additions & 9 deletions ntt/kernels/ct_mixed_radix_wide.cu
Original file line number Diff line number Diff line change
Expand Up @@ -213,15 +213,6 @@ public:
_CT_NTT<1><<<NTT_CONFIGURATION>>>(NTT_ARGUMENTS);
}
break;
case 12:
if (iterations <= 6) {
intermediate_twiddle_shift = 6;
d_intermediate_twiddles = ntt_parameters.radix6_twiddles_12;
_CT_NTT<2><<<NTT_CONFIGURATION>>>(NTT_ARGUMENTS);
} else {
_CT_NTT<1><<<NTT_CONFIGURATION>>>(NTT_ARGUMENTS);
}
break;
default:
_CT_NTT<1><<<NTT_CONFIGURATION>>>(NTT_ARGUMENTS);
break;
Expand Down
9 changes: 0 additions & 9 deletions ntt/kernels/gs_mixed_radix_wide.cu
Original file line number Diff line number Diff line change
Expand Up @@ -209,15 +209,6 @@ public:
_GS_NTT<1><<<NTT_CONFIGURATION>>>(NTT_ARGUMENTS);
}
break;
case 12:
if (iterations <= 6) {
intermediate_twiddle_shift = 6;
d_intermediate_twiddles = ntt_parameters.radix6_twiddles_12;
_GS_NTT<2><<<NTT_CONFIGURATION>>>(NTT_ARGUMENTS);
} else {
_GS_NTT<1><<<NTT_CONFIGURATION>>>(NTT_ARGUMENTS);
}
break;
default:
_GS_NTT<1><<<NTT_CONFIGURATION>>>(NTT_ARGUMENTS);
break;
Expand Down
4 changes: 2 additions & 2 deletions ntt/ntt.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ private:

if (lg_domain_size <= 10) {
params.step(lg_domain_size);
} else if (lg_domain_size <= 17) {
} else if (lg_domain_size <= 18) {
int step = lg_domain_size / 2;
params.step(step + lg_domain_size % 2);
params.step(step);
Expand Down Expand Up @@ -135,7 +135,7 @@ private:

if (lg_domain_size <= 10) {
params.step(lg_domain_size);
} else if (lg_domain_size <= 17) {
} else if (lg_domain_size <= 18) {
int step = lg_domain_size / 2;
params.step(step);
params.step(step + lg_domain_size % 2);
Expand Down
4 changes: 1 addition & 3 deletions ntt/parameters.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public:
fr_t (*partial_group_gen_powers)[WINDOW_SIZE]; // for LDE

#if !defined(FEATURE_BABY_BEAR) && !defined(FEATURE_GOLDILOCKS)
fr_t* radix6_twiddles_6, * radix6_twiddles_12, * radix7_twiddles_7,
fr_t* radix6_twiddles_6, * radix7_twiddles_7,
* radix8_twiddles_8, * radix9_twiddles_9;

private:
Expand Down Expand Up @@ -235,7 +235,6 @@ public:

#if !defined(FEATURE_BABY_BEAR) && !defined(FEATURE_GOLDILOCKS)
radix6_twiddles_6 = twiddles_X(64, 64, roots[12]);
radix6_twiddles_12 = twiddles_X(4096, 64, roots[18]);
radix7_twiddles_7 = twiddles_X(128, 128, roots[14]);
radix8_twiddles_8 = twiddles_X(256, 256, roots[16]);
radix9_twiddles_9 = twiddles_X(512, 512, roots[18]);
Expand Down Expand Up @@ -270,7 +269,6 @@ public:
(void)cudaFreeAsync(radix9_twiddles_9, gpu);
(void)cudaFreeAsync(radix8_twiddles_8, gpu);
(void)cudaFreeAsync(radix7_twiddles_7, gpu);
(void)cudaFreeAsync(radix6_twiddles_12, gpu);
(void)cudaFreeAsync(radix6_twiddles_6, gpu);
#endif
(void)cudaFreeAsync(twiddles[1], gpu);
Expand Down

0 comments on commit cb1bc09

Please sign in to comment.