Skip to content

Section 2d - Runtime Data Movement


In the preceding sections, we looked at how we can describe data movement between tiles within the AIE-array. However, to do anything useful, we need to get data from outside the array, i.e., from the "host", into the AIE-array and back. On NPU devices, we can achieve this with the operations described in this section.

The operations that will be described in this section must be placed in a separate sequence() of a Runtime class, or aie.runtime_sequence operation in the AIE dialect. The arguments to this function describe buffers that will be available on the host side; the body of the function describes how those buffers are moved into the AIE-array. Section 3 contains an example.

Guide to Managing Runtime Data Movement to/from Host Memory

In high-performance computing applications, efficiently managing data movement and synchronization is crucial. This guide provides a comprehensive overview of how to utilize IRON to manage data movement at runtime from/to host memory to/from the AIE array (for example, in the Ryzen™ AI NPU).

For IRON constructs like RuntimeTasks, please continue with this reading.

For the AIE dialect functions like npu_dma_memcpy_nd and dma_wait please continue reading here.

Under the hood, rt.fill() and rt.drain() lower through the DMA-task API: each becomes an aiex.dma_configure_task_for (configuring a single-BD chain on the shim channel named by the ObjectFifo's aie.shim_dma_allocation) followed by aiex.dma_start_task, with aiex.dma_await_task (when wait=True) or a deferred aiex.dma_free_task on task-group finish. The full catalog of runtime-sequence ops is in the AIEX dialect reference (../../../docs/AIEXDialect.md).


Prev · Top · Next