liveBook · Manning

Shared memory broadcast

As explained in Grokking GPU Programming

A memory broadcast supplies one value read from a single address to multiple threads.

When threads in a warp read the same shared-memory address, the hardware broadcasts that value to them in one transaction. This is not a bank conflict: conflicts involve different addresses mapping to the same bank. section 11.7 section 11.14

float val = data[0];    #A

This listing shows every thread reading data[0], a simple same-address broadcast. section 11.7

A tiled matrix multiplication

In a warp with the same threadIdx.y, every thread reads tileA[threadIdx.y][k]. That shared-memory read broadcasts one value across the warp, while the neighboring tileB access reads consecutive words. section 12.7

How Grokking GPU Programming covers it

How deep it goes
Explains the one-transaction broadcast and distinguishes it from conflicts caused by different addresses mapping to one bank.
Examples
Uses data[0] and tileA[threadIdx.y][k] to illustrate same-address reads.
What it assumes
Assumes familiarity with warps and shared-memory accesses; does not establish those concepts from scratch.
What you can do after
Evaluate shared-memory warp accesses by checking whether threads read the same address or different addresses in one bank.
How it connects
Connects shared-memory broadcast to warps, bank conflicts, and tiled matrix multiplication.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Grokking GPU Programming. The section links point to the parts of the book it draws on.