Skip to content

Commit

Permalink
Merge pull request #3097 from autonomys/fix-small-gpu-support-backport
Browse files Browse the repository at this point in the history
Backport: fix small GPU support
  • Loading branch information
nazar-pc authored Oct 7, 2024
2 parents b0e738e + 8f765d3 commit 5e21f1b
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 5e21f1b

Please sign in to comment.