semiAIfoundry

Compute architecture · Atlas v1.3.0

Tensor Memory Accelerator

Moves multidimensional tensor tiles asynchronously so compute threads can spend less effort copying data.

Explore in AtlasConceptual engine and transfer paths within the GPU

Learning objectiveCalculate ideal tile-pipeline latency and explain why asynchronous copying still requires completion and synchronization.

The mechanism

TMA is a data movement engine. Software describes a tensor and its layout, then requests transfers while other work proceeds. This reduces the need for threads to compute every address and issue every individual load during tile staging. The result is not instantaneous memory: the transfer still uses bandwidth, must complete, and needs the correct synchronization before consumers use its data. Pipelines can stage the next tile while the current tile is being multiplied. First introduced with Hopper and extended on Blackwell, this mechanism is separate from Blackwell Tensor Memory, which stores tensor operands and accumulators. The copy engine, destination buffer and completion signal have distinct roles: initiating a transfer does not make its destination ready for consumers.

  1. Software describes a tensor’s dimensions, layout, and the tile that should be transferred.
  2. TMA performs an asynchronous bulk copy so compute work can proceed while the tile moves into the appropriate buffer.
  3. A completion signal tells consumers when it is safe to use the tile, enabling a pipeline of loading and computation.

Science and assumptions

Overlap changes a sum into a bottleneck

Tpipeline≈tload+tcompute+(N−1)max⁡(tload,tcompute)T_{\mathrm{pipeline}}\approx t_{\mathrm{load}}+t_{\mathrm{compute}}+(N-1)\max(t_{\mathrm{load}},t_{\mathrm{compute}})

Pipeline time is the first load plus first compute, followed by N minus one tile intervals, each set by the slower stage.

Symbols and units
T_pipeline
Total two-stage pipeline time including fill and drain

s

t_load
Load time for one equal tile

s

t_compute
Compute time for one equal tile

s

N
Number of tiles

positive integer count

N is the number of equal tiles. After filling the first stage, a two-stage pipeline can load the next tile while computing on the current one. The slower stage sets the steady-state cadence. Without overlap, the same sequence takes approximately N × (tload + tcompute), so copy/compute overlap can improve throughput without increasing the arithmetic rate.

Assumptions Ideal independent load and compute resources, adequate double buffering, equal tile times, and negligible synchronization overhead. Shared bandwidth or resource contention can reduce or remove overlap. TMA remains a copy engine, distinct from Tensor Memory storage.

Engineering example

Synthetic four-tile pipeline: each load takes 3 μs and each compute stage 5 μs. Serial execution takes 4 × (3 + 5) = 32 μs. Ideal double buffering takes 3 + 5 + 3 × max(3, 5) = 23 μs, before synchronization and contention.

Distinctions and tradeoffs

Asynchronous movement is not instantaneous movement. Copies still consume bandwidth and need correct synchronization before their data can be used.

Overlapping copies with arithmetic can hide movement time but requires buffers for in-flight work. More pipeline stages consume shared memory and can reduce parallel residency.

Transformer kernels repeatedly stage blocks of weights and activations. A copy engine frees execution resources and makes sustained matrix throughput easier to approach.

Specifications and interfaces

Tensor rank
1D through 5D transfers

Hopper TMA programming model retained and extended by later architectures.

Main path
Global memory ↔ shared memory

Supported paths and instructions depend on architecture.

Operation style
Asynchronous producer/consumer

Synchronization establishes when a copied tile is safe to read.

Interfaces

Descriptor and request Input
Tensor layout and tile coordinates
Memory transfer Output
Bulk tile movement
Completion event Output
Barrier or synchronization update

Check your understanding

How does a pipelined kernel benefit from TMA?

  1. It can prepare a future tile while computing on the current tile.
  2. It eliminates the need for HBM or shared memory.
  3. It makes every model use the same matrix dimensions.
Answer and reasoning

It can prepare a future tile while computing on the current tile.

The gain comes from overlapping movement and computation and reducing thread work spent on copying, subject to bandwidth and buffering limits.

Historical context

2022 · Hopper introduces Tensor Memory Accelerator

Hopper added an engine for moving tensor tiles asynchronously between global and shared memory, allowing threads and tensor arithmetic to overlap useful work with data transfer.

NVIDIA: Hopper Architecture In-Depth

Evidence and scope

The overlap model is the lesson’s ideal two-stage pipeline, supported by the linked asynchronous-copy guidance. TMA moves data; Tensor Memory stores it. Adequate buffering and independent resources are assumptions, not guaranteed speedup.

No current calculator directly models this lesson’s main mechanism. Use the library for related bounds while retaining their stated omissions.

Sources

Published lesson data · Atlas releases and licensing

Continue exploring

Foundations

Related lessons