Brick Library 0.1
Performance-portable stencil datalayout & codegen
|
***Distributed Performance-portable Stencil Compuitation - Documentation@bricks.run***
We uses CMake to find libraries. If some library fails to load, be sure to check the find module for it in CMake and set the corresponding paths. Sometimes, libraries may not adhere to standards or CMake may not be up-to-date. In such cases, setting CMake variables directly in the top-most CMakeLists.txt is recommended.
mkdir build
cd build && cmake .. -DCMAKE_BUILD_TYPE=Release
make <testname>
For description of the test cases see here.
For the list of configuration variables, use cmake -L ..
or cmake-gui
in the build directory.
This library can be used as either a submodule or be installed and linked to. examples/external
provide an example of linking to this library from an external project.
The brick template consists of 3 part:
Brick
: declare brick data structureBrickInfo
: an adjacency list that describes the relations between bricksBrickStorage
: a chunk of memory for storing bricksThe behavior of such templated data structures are as normal: they do not require the use of code generator to function; provide a fallback way of writing code for compute & data movement.
Stencil expression for code generator are specified using Python library. Code generator provide optimization and vectorization support for different backend.
The code generation are carried out by CMake wrapper automatically. For details, see Codegen Integration.
Template arguments & code ordering is contiguous dimension last. Dimension arrays are contiguous at 0 (contiguous first).
include
and src
contains the brick library headers and library files.docs
various documentscmake
CMake module filestencils
contains different stencils and related initialization code used by all tests as neededsingle
for single node (no MPI)weak
for weak scaling or strong scaling with one-level decomposition (one subdomain per rank)strong
for strong scaling with two-level decomposition (multiple fixed-sized subdomains per rank)A large portion of the brick library is entirely based on templates and can be included as a header only library.
[1] Zhao, Tuowen, Samuel Williams, Mary Hall, and Hans Johansen. 2018. Delivering Performance-Portable Stencil Computations on CPUs and GPUs Using Bricks. In 2018 IEEE/ACM International Workshop on Performance, Portability and Productivity in HPC (P3HPC). 59-70. DOI:https://doi.org/10.1109/P3HPC.2018.00009
[2] Tuowen Zhao, Protonu Basu, Samuel Williams, Mary Hall, and Hans Johansen. 2019. Exploiting reuse and vectorization in blocked stencil computations on CPUs and GPUs. In Proceedings of the International Conference for High Performance Computing, Networking, Storage and Analysis (SC '19). Association for Computing Machinery, New York, NY, USA, Article 52, 1–44. DOI:https://doi.org/10.1145/3295500.3356210
[3] Tuowen Zhao, Mary Hall, Hans Johansen, and Samuel Williams. 2021. Improving communication by optimizing on-node data movement with data layout. In Proceedings of the 26th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming (PPoPP '21). Association for Computing Machinery, New York, NY, USA, 304–317. DOI:https://doi.org/10.1145/3437801.3441598