9 / 20 · Concept
Output-stationary and other dataflows
Compare storage and transport by identifying what stays in the PE.
Lessons are free to read. Enroll to save your learning progress.
Ask which value remains local
A systolic array performs parallel work while operands move through neighboring processing elements. “Stationary” describes a value retained nearby for reuse during a computation. Different choices change PE registers, partial-sum paths and the boundary schedule even when the mathematical operation is identical.
In this course's output-stationary design, PE(i,j) retains the partial sum for C(i,j). A and B move as k advances. After all K terms arrive, the result is collected; clear starts a new output tile. A values are reused across a row and B values down a column. In the 2×2 example, A(0,0)=1 contributes to both C(0,0) and C(0,1).
Weight-stationary designs preload weights such as B into PEs and reuse them across incoming activations. Partial sums must move or collect elsewhere. Renaming ports does not transform the OS controller into WS: the stored value, preload sequence and result path all change. Input-stationary designs retain activations for reuse across weights or output calculations. We compare that idea without implementing an IS array here.
| Dataflow | Retained value | Cost to examine |
|---|---|---|
| OS | Output partial sum | Wide accumulators and result collection |
| WS | Weight | Preload and partial-sum transport/storage |
| IS | Activation | Weight supply and output-sum combination |
Keep three traffic measurements separate
Consider two 2×2 products using the same B. Our OS boundary model feeds four A and four B values per job: sixteen operand values across two jobs. A local B buffer can avoid rereading B from external memory for the second job, while still supplying its four boundary tokens. Weight preload reuse offers a different tradeoff and requires a different partial-sum path.
External reads, boundary injections and PE-to-PE transfers are separate measurements. The UC Berkeley Gemmini README provides a primary-source example of configurable OS and WS dataflows. Our learning array has its own contract and does not reproduce Gemmini's implementation or instruction interface.
For a design review, identify what stays local, where sums accumulate and which values cross each boundary. Reuse alone does not guarantee adequate memory ports or sustained throughput.
Try it yourself
Two 2×2 jobs share B retained in a local buffer. A is not reused. How many external operand reads and OS boundary injections are required?
Read the explanation
External reads total 12 values: two A matrices of four plus one B matrix of four. Boundary injections total 16 values: four A plus four B per job. Result writes and internal forwarding are excluded.