diku-dk / futhark

:boom::computer::boom: A data-parallel functional programming language
http://futhark-lang.org
ISC License
2.41k stars 166 forks source link

Replace some memory fences with "atomic writes". #2146

Closed athas closed 6 months ago

athas commented 6 months ago

On our current backends, an atomic write is just a write followed by a memory fence, but on some future ones (e.g. the WebGPU one), fences supported only implicitly through use of atomic data types. It turns out that in most (all?) cases, we only need fences for these "atomic writes". The possible exception is single pass scan, but we will not use that for the WebGPU backend anyway.