← Questions
Deterministic-order parallel reduction in CUDA
0
I was asked this
No reports yet. Sign in to say where you were asked it.
Write a parallel reduction on the GPU (for example a sum over a large float array) whose result does not depend on how threads happen to be scheduled: the additions must happen in a fixed order, so the same input always gives bit-identical output. Explain why an ordinary atomic or tree reduction can give different floating-point results from run to run, then design and code a reduction with a guaranteed order, in the spirit of a parallel prefix sum. Discuss its cost compared with an unordered reduction.
No official answer yet. Write yours on the right and run it.
Nothing published yet.
Sign in to submit your code; every attempt is kept here.
Write and test your solution herePython in your browser, the question's tests level by level, every submission kept for you.Sign in to start coding
