Knowledge note

NDDMA

A multidimensional direct-memory-access engine that copies tensor data while applying layout transformations.

Updated September 16, 2026Confidence: Medium

NDDMA

NDDMA is an N-dimensional Direct Memory Access engine that copies tensor data while applying multidimensional layout transformations in hardware.

Why It Exists

Tensor layouts such as NCHW and NHWC, padding, and strided sub-blocks turn a simple copy into many address calculations and small memory operations. If software performs that work element by element, data movement can dominate the kernel.

How It Works

The Ascend 950 NDDMA engine receives dimension, stride, and placement parameters, reads a structured region from global memory, and writes the reordered result into Vector Unified Buffer. The white paper reports support for up to five dimensions and an internal cache that can combine fine-grained accesses into 128-byte reads when the pattern has locality.

Tradeoffs

NDDMA reduces instruction and address-generation work, but the configured shape still has to match alignment, layout, and buffer-capacity constraints. Irregular or low-locality transfers can remain expensive.

Common Confusions

  • NDDMA vs. ordinary DMA: Ordinary DMA moves bytes between addresses; NDDMA also describes multidimensional tensor layout and reorder behavior.
  • NDDMA vs. a transpose kernel: NDDMA is a movement primitive that can perform selected layout transformations; it is not a general arbitrary tensor algorithm.

Where It Appears

  • Global Memory — The source or destination of many NDDMA transfers.
  • Memory Banking — The on-chip access structure that receives or serves moved tiles.