Relaxed Memory Model Zoo

Memory model
← Back to the map

OpenCL 2.0 Memory Model

2016 · Batty, Donaldson, Wickerson · language, gpu, formal, scoped

A scoped extension of the C11 model for heterogeneous compute, adding memory scopes (work-item, work-group, device, all-SVM-devices) on top of C11's atomic orderings. At all-devices scope it coincides with C11; narrower scopes permit additional weak behaviours. Formalised and repaired alongside C11 by Batty, Donaldson & Wickerson (POPL 2016).

Ordering relationships

Strictly weaker than
  • C11/C++11 Memory Model — OpenCL 2.0 extends C11 with memory scopes; at all-SVM-devices scope it coincides with C11, but narrower scopes (work-group, device) permit synchronisation-free weak behaviours that flat C11 forbids. See Batty, Donaldson & Wickerson (POPL 2016).
Compiles correctly to
Incomparable with
  • Vulkan Memory Model — Both are scoped GPU API models, but differ in scope sets and synchronisation primitives — Vulkan adds explicit availability/visibility operations that OpenCL lacks; neither contains the other.

References

  • Mark Batty, Alastair F. Donaldson, John Wickerson. Overhauling SC Atomics in C11 and OpenCL. POPL 2016, 2016. doi:10.1145/2837614.2837637
  • Jade Alglave, Mark Batty, Alastair F. Donaldson, Ganesh Gopalakrishnan, Jeroen Ketema, Daniel Poetzl, Tyler Sorensen, John Wickerson. GPU Concurrency: Weak Behaviours and Programming Assumptions. ASPLOS 2015, 2015. doi:10.1145/2694344.2694391