A group ports the explicit diffusion stencil (five-point stencil
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 group ports the explicit diffusion stencil (five-point stencil, diffusion number α=0.25) from a compiled CPU loop over all cores to a GPU kernel, both acting on a 2048×2048 grid of binary64 values for Nt=5000 steps.
((a)) The fused two-buffer kernel moves the perfect-reuse minimum of 16B per cell update (one read and one write of the cell's own value, each neighbour's value shared with its own update). Give the total memory traffic, in GB, for the whole run.
((b)) Each update rounds to relative error at most ϵmach/2 in binary64. Counting one such rounding of each stored value per step and letting the Nt sequential roundings add in the worst case, derive the relative tolerance you would use to accept the GPU kernel's final field as agreeing with the array code's, and evaluate it numerically.
((c)) The CPU node's measured triad bandwidth is 190GBs−1 and the GPU's is 1550GBs−1; both devices' ridge points exceed the stencil's intensity of 7/16flopB−1, so both are bandwidth-limited. Predict the ratio of the GPU's attained rate to the CPU's.
((d)) If the GPU kernel is instead run in float32, halving the bytes moved per cell update, predict the factor by which its attained rate increases relative to the binary64 GPU kernel, assuming both remain bandwidth-limited.