Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backport: fix small GPU support #3097

Merged
merged 1 commit into from
Oct 7, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading