Skip to content

Commit

Permalink
Merge pull request #3096 from autonomys/fix-small-gpu-support
Browse files Browse the repository at this point in the history
Fix small GPU support
  • Loading branch information
nazar-pc authored Oct 6, 2024
2 parents 1c5980d + 1b51c31 commit c43e2a3
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 c43e2a3

Please sign in to comment.