November 2015
Intermediate to advanced
206 pages
6h 14m
English
L. Howes*; D. Hower†; B.R. Gaster‡ * Qualcomm, Santa Clara, CA, USA† Qualcomm, Raleigh-Durham, NC, USA‡ University of the West of England, Bristol, UK
In this chapter, we show how to correctly use key Heterogeneous System Architecture (HSA) memory features, including atomic memory operations, memory segments, and memory scopes. A primary focus of the chapter, and the HSA memory model in general, is to develop an understanding of memory ordering, or how loads and stores from concurrently running HSA agents interleave with one another. We show how to use synchronization in an HSA program, such that it will always result in a simple, program-ordered interleaving known as a sequentially consistent execution. ...