Abstract
On a system that exposes disjoint memory spaces to the software, a program has to address memory consistency issues and perform data transfers so that it always accesses valid data. Several approaches exist to ensure the consistency of the memory accessed. Here we are interested in the verification of a declarative approach where each component of a computation is annotated with an access mode declaring which part of the memory is read or written by the component. The programming framework uses the component annotations to guarantee the validity of the memory accesses. This is the mechanism used in VectorPU, a C++ library for programming CPU-GPU heterogeneous systems. This article proves the correctness of the software cache-coherence mechanism used in VectorPU. Beyond the scope of VectorPU, this article provides a simple and effective formalization of memory consistency mechanisms based on the explicit declaration of the effect of each component on each memory space. The formalism we propose also takes into account arrays for which a single validity status is stored for the whole array; additional mechanisms for dealing with overlapping arrays are also studied.
Highlights
Heterogeneous computer systems, such as traditional CPU-GPU based systems, often expose disjoint memory spaces to the programmer, such as main memory and device memory, with the need to explicitly transfer data betweenUniversite Cote d’Azur, CNRS, I3S, France.Preprint submitted to Journal of Logical and Algebraic Methods in ProgrammingOctober 24, 2019 these
Like StarPU, VectorPU requires the programmer to annotate each operand of a component with the access mode including the accessing unit (CPU, GPU), and uses smart data containers for automatic transparent software caching based on this access mode information
In this article we provided a formal approach to verify the consistency of the memory accesses in heterogeneous computer systems made of two memory spaces
Summary
Heterogeneous computer systems, such as traditional CPU-GPU based systems, often expose disjoint memory spaces to the programmer, such as main memory and device memory, with the need to explicitly transfer data between. For CPU-GPU systems, this can be done in the form of special datacontainers, which are generic, STL-like data abstractions such as vector that wrap multi-element data structures such as arrays These data-container objects internally perform transparent, coherent software caching of (subsets of) accessed elements in the different memories so they can be reused (as long as not invalidated) in order to avoid unnecessary data transfers. Like StarPU, VectorPU requires the programmer to annotate each operand of a component with the access mode (read, write, or both) including the accessing unit (CPU, GPU), and uses smart data containers for automatic transparent software caching based on this access mode information. We formalize access modes and data transfers in CPU-GPU heterogeneous systems and prove the correctness of the software cache coherence mechanism used in VectorPU.
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have