Skip to content

Commit

Permalink
Fix small GPU support
Browse files Browse the repository at this point in the history
  • Loading branch information
nazar-pc committed Oct 6, 2024
1 parent b0e738e commit 8f765d3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion shared/subspace-proof-of-space-gpu/src/chacha.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -101,12 +101,13 @@ void chacha_mix(chacha_state& state, size_t counter)

template<int ROUNDS>
__global__ __launch_bounds__(1024)
void generate_chacha_keystream(chacha_state* output, chacha_state state,
void generate_chacha_keystream(chacha_state* output, chacha_state _state,
size_t output_block_count)
{
size_t tid = blockIdx.x * (size_t)blockDim.x + threadIdx.x;

for (size_t i = tid; i < output_block_count; i += (size_t)gridDim.x * blockDim.x) {
chacha_state state = _state;
chacha_mix<ROUNDS>(state, i);

output[i] = state;
Expand Down

0 comments on commit 8f765d3

Please sign in to comment.