Skip to content

Commit

Permalink
polynomial/div_by_x_minus_z.cuh: move a sanity check to the host side.
Browse files Browse the repository at this point in the history
  • Loading branch information
dot-asm committed Nov 27, 2024
1 parent 83b5d2a commit da08434
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions polynomial/div_by_x_minus_z.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ void d_div_by_x_minus_z(fr_t d_inout[], size_t len, fr_t z)
}
};

#if 0
assert(blockDim.x%WARP_SZ == 0 && gridDim.x <= blockDim.x);
#endif

const uint32_t tid = threadIdx.x + blockDim.x*blockIdx.x;
const uint32_t laneid = threadIdx.x % WARP_SZ;
Expand Down Expand Up @@ -379,6 +381,7 @@ void div_by_x_minus_z(fr_t d_inout[], size_t len, const fr_t& z,
cudaFuncAttributes attr;
CUDA_OK(cudaFuncGetAttributes(&attr, d_div_by_x_minus_z<fr_t, rotate, BSZ>));
saved_blockDim = attr.maxThreadsPerBlock;
assert(saved_blockDim%WARP_SZ == 0);
}

blockDim = saved_blockDim;
Expand Down

0 comments on commit da08434

Please sign in to comment.