research28 min studyLesson 997 in Engineering

Account for the movement that remains near memory

Compare digital and analog near-memory designs using supported operations, precision, host traffic, and complete energy boundaries.

On this page

What you’ll understand

  • Separate reduced host traffic from eliminated data movement.
  • Build a fictional energy ledger without mixing boundaries.
  • Explain precision and operation-support costs in digital and analog PIM.

Processing near or inside memory can reduce transfers to a distant processor, especially when many operations reuse resident data. It does not make movement, arithmetic, or coordination free. Inputs still enter the memory system, results leave, intermediate values move locally, and unsupported operations may return to the host. Digital cores near memory and analog crossbar arithmetic also have different numerical and execution contracts. Start with the exact algorithm and representation, then compare all required traffic and work. The energy ledger in this lesson is fictional and combines no measured claims from different devices.

Choose the mechanism before counting benefits

Digital near-memory cores execute an instruction set with finite local storage and memory-transfer rules. Their usefulness depends on native arithmetic, available parallelism, and communication between partitions. The referenced UPMEM training study evaluates specific classical learning algorithms and reports the importance of supported operations and data representations. It is not evidence that arbitrary deep-learning training automatically accelerates. Host-mediated communication or packing can dominate an algorithm whose independent memory-local work is too small.

Analog crossbars instead use physical conductances and electrical signals for parts of a dot-product computation. A complete accelerator needs input encoding, output conversion, signed-value handling, accumulation, and control. The ISAAC design uses bit slicing and supporting digital structures; one array operation should not be described as an arbitrary full-precision multiply-accumulate. Distinguish an analog device operation from a complete numerically specified matrix multiplication, including the passes and conversions required by its representation.

Tnear=Tpack+DinBhost+Tlocal+Treduce+DoutBhostT_{\rm near}=T_{\rm pack}+\frac{D_{\rm in}}{B_{\rm host}}+T_{\rm local}+T_{\rm reduce}+\frac{D_{\rm out}}{B_{\rm host}}
This serial illustrative model uses seconds, host bytes/s, and input/output bytes crossing the defined host boundary. Tlocal includes the actual supported local arithmetic and memory accesses; Treduce includes required cross-partition combination. Overlap or separate directional bandwidths require an explicit alternative schedule.↔ Scroll wide equations horizontally.

Measure representation and numerical costs

Fixed-point, quantized, bit-serial, and analog implementations must meet the same declared application-quality requirement as their baseline. Include dynamic range, overflow, saturation, accumulation width, conversion precision, and calibration effects. Replacing a nonlinear function with a lookup table changes both implementation and approximation. Validate the complete model’s output or learning behavior rather than checking only one ideal dot product. A nominal precision label does not uniquely identify the numerical error produced by the full execution path.

Separate one-time and repeated costs. Writing or programming weights may be amortized over many inferences but can dominate frequent updates. Packing data into the required memory layout may be cheap once and expensive if repeated for each batch. Include local reads, host reductions, and intermediate writebacks in the movement ledger. A reduction in host-link bytes is a useful mechanism measurement, but it cannot by itself determine end-to-end latency or energy when arithmetic and conversion costs change.

Etotal=PstaticT+∑jnjbitsej+∑knkopsekE_{\rm total}=P_{\rm static}T+\sum_j n^{\rm bits}_j e_j+\sum_k n^{\rm ops}_k e_k
Static power uses watts and elapsed seconds; each movement term counts bits times joules/bit, and each arithmetic term counts explicitly defined operations times joules/operation. Components must have disjoint boundaries to avoid double-counting measured totals; precision, conversion, and control costs must be assigned somewhere.↔ Scroll wide equations horizontally.

Compare complete systems and supported workloads

Use a baseline optimized for the same task, precision target, data residency, and batch size. If the near-memory design changes the model to fit its instruction set, report that model-quality change and any retraining cost. Include host CPU work and the memory modules or external devices needed to run the algorithm. A per-array energy figure cannot be compared directly with a wall-plug whole-system inference measurement without reconciling their boundaries.

Evaluate scaling under skew and shared-resource contention. Independent partitions may scale well until a reduction or host path dominates, while an unbalanced partition can leave nearby compute idle despite abundant aggregate bandwidth. Report which algorithms and operators actually run on the memory-side device and which fall back elsewhere. Present the result as a workload-specific design point with an explanation of saved movement and added costs, rather than as a universal consequence of putting computation closer to storage.

Reduced host traffic is only one energy term

A fictional baseline transfers 64 decimal MB across a defined host link. A near-memory candidate transfers 1 MB input plus 0.5 MB output over that link. Link energy is 10 pJ per transferred bit for both. Candidate-only disjoint additional costs are 0.8 mJ local access, 1.0 mJ arithmetic, 0.4 mJ representation/conversion, and 0.3 mJ host/control.

  1. Host-link bytes fall from 64 MB to 1.5 MB, a reduction factor 64/1.5≈42.67. This ratio says nothing about local movement inside the candidate.

  2. Baseline host-link energy is 64×10⁶×8×10×10⁻¹² J=5.12 mJ. Candidate host-link energy is 1.5×10⁶×8×10×10⁻¹² J=0.12 mJ.

  3. Candidate total within the explicitly stated ledger is 0.12+0.8+1.0+0.4+0.3=2.62 mJ. The baseline’s 5.12 mJ is only its link term, so a complete system comparison still requires its other energy terms.

The result

The arithmetic quantifies a specific saved movement term and a candidate ledger. It does not turn a 42.67-fold traffic reduction into a 42.67-fold whole-system energy or speedup claim.

Explore the model

Interactive lab

Interactive lab · roofline

Reduced traffic changes one bound, not the whole implementation

Reset, set Operational intensity I to 1 and Memory bandwidth B to 100. Predict synthetic ceiling 100 GFLOP/s before Step. Reset, explicitly set I=4 and B=100, then Step: predict 400 GFLOP/s. The fixed peak remains 1000 GFLOP/s. This roofline assumes compatible arithmetic and counts no host reduction, PIM instruction emulation, ADC, calibration, or energy. It is not a PIM device model or measurement.

Reduced traffic changes one bound, not the whole implementationSynthetic roofline ceiling min(1000, B·I), in GFLOP/s, with B in decimal GB/s and I in FLOP/byte. Playback traces the roof without changing the selected kernel. This upper-bound model is not a measured throughput prediction, hardware comparison or price model. Current readings: Attainable ceiling: 640 GFLOP/s; Ridge intensity: 12.5 FLOP/byte; Ceiling regime: Memory-bound ceiling. All parameters are adjustable with the labeled controls below.Hypothetical roofline upper bound: 640 GFLOP per second at operational intensity 8 FLOP per byte and bandwidth 80 gigabytes per second.0.1110641101001000Operational intensity · FLOP/byte · log scaleCeiling · GFLOP/s · log scalePeak: 1000
Attainable ceiling / kernelBandwidth roof / traceCompute ceiling
Attainable ceiling
640 GFLOP/s
Ridge intensity
12.5 FLOP/byte
Ceiling regime
Memory-bound ceiling
t = 0 s

Synthetic roofline ceiling min(1000, B·I), in GFLOP/s, with B in decimal GB/s and I in FLOP/byte. Playback traces the roof without changing the selected kernel. This upper-bound model is not a measured throughput prediction, hardware comparison or price model. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.

Look forMovement savings matter only alongside the arithmetic and representation that remain.

Check your understanding

What can be concluded from the fictional 42.67-fold host-traffic reduction?

Try it yourself

A fictional near-memory operation crosses a host boundary with 2 decimal MB. At 8 pJ/bit, compute that link energy. If disjoint local, compute, and control costs sum to 0.9 mJ, find the ledger total.

Take a moment to make a prediction or work it out on paper. Open a hint when you need one.

Give me a hint

Convert bytes to bits and picjoules to joules before adding millijoules.

Compare with the solution

Link energy is 2×10⁶×8×8×10⁻¹² J=0.128 mJ. Adding the disjoint 0.9 mJ costs gives 1.028 mJ. A comparison against another design still requires its complete boundary-matched ledger and matched numerical quality, not only its arithmetic-unit energy.

Take it with you

  • Distinguish digital near-memory execution from analog crossbar arithmetic.
  • Include precision, representation, local movement, and host coordination.
  • Compare complete energy and runtime boundaries at matched quality.

Read further

Original sources and deeper explanations to follow at your own pace.

Optional progress, saved in this browser when available. Revisit any lesson at any time.

Lesson not marked complete.