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, 1111 floating-point operations per update) is run on a 5123512^3 grid of binary64 values for 20002000 steps, both on a CPU node (measured triad 190 GB s−1190\,\mathrm{GB\,s^{-1}}, measured matrix-product peak 1.8 TFLOP s−11.8\,\mathrm{TFLOP\,s^{-1}}) and on a GPU (measured triad 1550 GB s−11550\,\mathrm{GB\,s^{-1}}, FP64 peak 9.7 TFLOP s−19.7\,\mathrm{TFLOP\,s^{-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 16 B16\,\mathrm{B} per cell update regardless of dimension), give the stencil's arithmetic intensity in flop B−1\mathrm{flop\,B^{-1}}. ((b)) Check that both devices' ridge points exceed this intensity, and predict the attained rate, in TFLOP s−1\mathrm{TFLOP\,s^{-1}}, on the CPU and on the GPU. ((c)) Using the accumulated-rounding bound for 20002000 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.

Browse the problem library