Data reuse
Data reuse is the use of a value in multiple computations without repeatedly fetching it from its original storage.
Grokking GPU Programming
Data reuse is the practice of retaining or sharing a value so that multiple computations can use it without repeatedly fetching it from its original storage.
- How it is used
- Reduces repeated global-memory requests by sharing loaded values among GPU computations.
- How deep it goes
- Works through tiled loading, synchronization, traffic counts, and resource tradeoffs; identifies stencil reuse without implementing it.
- Examples
- Compares naive and tiled matrix multiplication and identifies reuse in overlapping stencil neighborhoods.
- What you can do after
- Apply it using CUDA shared memory to cooperatively load and reuse matrix tiles while synchronizing block threads.
CUDA for LLMs
Data reuse is the repeated use of a loaded value across multiple computations to reduce memory traffic.
- How it is used
- Uses data reuse to reduce global-memory pressure and raise arithmetic intensity in GEMM optimization.
- How deep it goes
- Traces reuse through shared-memory tiles and register-blocked outputs, with a numerical tile example and measured performance progression.
- Examples
- Compares GEMV with GEMM and estimates 8× reuse for 128-by-128 output tiles with a reduction tile of 8.
- What you can do after
- Apply data reuse through shared-memory tiling and register blocking when optimizing GEMM kernels.
Also covered in
- GPU Programming with TritonIn early access (MEAP)
What to know first
- hardware registerA hardware register is a small, rapidly accessible storage location within a processor or processing device that holds data, addresses, or control information during execution.
- compute-boundA computation is compute-bound when its performance is limited primarily by processing capacity rather than memory transfer, input/output, or other resources.
- inner productAn inner product is a scalar-valued operation on two vectors that generalizes the dot product, which for real coordinate vectors is the sum of products of corresponding components.
- GPU memoryGPU memory is memory available to a graphics processing unit for storing data and state used in graphics or computation.
Related concepts
- tilingproduced by · Tiling is an optimization technique that partitions data or computation into smaller blocks to improve locality, reuse, and memory efficiency.
- convolutionproduced by · Convolution is an operation that applies a filter or kernel across an input, combining values from local neighborhoods to produce output values.
- shared memoryused by · Shared memory is a memory region accessible to multiple processes, threads, or other concurrent execution contexts for sharing data.
- arithmetic intensityproduces · Arithmetic intensity is the ratio of computational operations performed to bytes of data transferred by a computation.
Questions about data reuse
What is data reuse?
Data reuse is the use of a value in multiple computations without repeatedly fetching it from its original storage.
Which Manning books explain data reuse?
Grokking GPU Programming and CUDA for LLMs.
What should I know before learning data reuse?
Manning books that teach data reuse usually introduce hardware register, compute-bound, inner product and GPU memory first.
What is the difference between data reuse and memory reuse?
Data reuse is the use of a value in multiple computations without repeatedly fetching it from its original storage. Memory reuse is the practice of serving new allocation requests from memory that has already been allocated and returned for reuse.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

