Skip to content

Commit

Permalink
pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
VitaliiH authored and VitaliiH committed Jul 25, 2024
1 parent 15d9cd1 commit 0fcbb58
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 1 addition & 4 deletions icicle/src/ntt/kernel_ntt.cu
Original file line number Diff line number Diff line change
Expand Up @@ -703,11 +703,8 @@ namespace mxntt {
CHK_INIT_IF_RETURN();

if (log_size < 4) {
// TODO: should throw exception
// TODO: fast twiddles should be used only with mixed radix ntt
// THROW_ICICLE_ERR(IcicleError_t::InvalidArgument, "log_size must be >= 4");
printf("warning: when using fast twiddles, log_size must be at least 4, got %d\n", log_size); // TODO: logging
return cudaSuccess;
THROW_ICICLE_ERR(IcicleError_t::InvalidArgument, "when using fast twiddles, log_size must be at least 4");
}

S* w6_table;
Expand Down
2 changes: 2 additions & 0 deletions icicle/src/ntt/ntt.cu
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,8 @@ namespace ntt {
CHK_IF_RETURN(mxntt::generate_external_twiddles_generic(
primitive_root, domain.twiddles, domain.internal_twiddles, domain.basic_twiddles, domain.max_log_size,
ctx.stream));

fast_twiddles_mode &= domain.max_log_size >= 4; // fast twiddles cannot be built for smaller domain

if (fast_twiddles_mode) {
// generating fast-twiddles (note that this cost 4N additional memory)
Expand Down

0 comments on commit 0fcbb58

Please sign in to comment.