A three-dimensional diffusion stencil (a seven-point Laplacian: a cell plus its six…
PHYSICS · Multi-part · Fermi University Physics · Computational Physics · High-performance and data-driven computational physics · High-performance and data-driven computational physics
Scientific Computing for Physicists, Ch Graphics processors: kernels, memory and the roofline
Problem
A three-dimensional diffusion stencil (a seven-point Laplacian: a cell plus its six face neighbours, 11 floating-point operations per update) is run on a 5123 grid of binary64 values for 2000 steps, both on a CPU node (measured triad 190GBs−1, measured matrix-product peak 1.8TFLOPs−1) and on a GPU (measured triad 1550GBs−1, FP64 peak 9.7TFLOPs−1).
((a)) Using the same perfect-reuse byte-counting argument as for the two-dimensional stencil (one read and one write of the cell's own value, each neighbour's value shared with its own update, so 16B per cell update regardless of dimension), give the stencil's arithmetic intensity in flopB−1.
((b)) Check that both devices' ridge points exceed this intensity, and predict the attained rate, in TFLOPs−1, on the CPU and on the GPU.
((c)) Using the accumulated-rounding bound for 2000 sequential binary64 updates, give the relative tolerance for verifying the GPU kernel's field against the CPU array code's.
((d)) If the GPU kernel is run in float32 instead, halving the bytes moved per update, predict the factor by which its attained rate increases over the binary64 GPU kernel, assuming it remains bandwidth-limited.