Design for Heterogeneity
Last updated on 2025-05-12 | Edit this page
Overview
Questions
- How should one design software for heterogeneous platforms
Objectives
- To understand how research software design needs to adapt for heterogeneous platforms
Underlying Ideas: Unification of Computational Expressions
Make the same code work on different devices
-
Same algorithm different data layouts or operation
sequence:
- A way to let compiler know that ”this” expression can be specialized in many ways
- Definition of specializations
- Often done with template meta-programming
-
More challenging if algorithms need to be fundamentally
different
- Support for alternatives
Underlying Ideas: Moving Work and Data to the Target
Parallelization Models
-
Hierarchy in domain decomposition
- Distributed memory model at node level – still very prevalent, likely to remain so for a while
- Also done with PGAS models – shared with locality being important
Assigning work within the node
“Parallel For” or directives with unified memory
Directives or specific programming model for explicit data movement
More complex data orchestration system for asynchronous computation
Task based work distribution
Underlying Ideas: Mapping Work to Targets
This is how many abstraction layers work
Infer the structure of the code
Infer the map between algorithms and devices
Infer the data movements
Map computations to devices
These are specified either through constructs or pragmas
It can also be the end user who figures out the mapping
In either case performance depends upon how well the mapping is done