Modfied Kahn Process Network (KPN) - 2025.2 English - XD100

Vitis Tutorials: AI Engine Development (XD100)

Document ID
XD100
Release Date
2025-12-05
Version
2025.2 English

One way to implement a system capable of parallel computing is with a Kahn Process Network (KPN). Wikipedia states that “A Kahn process network (KPN, or process network) is a distributed model of computation in which a group of deterministic sequential processes communicate through unbounded first in, first out channels. The model requires that reading from a channel is blocking while writing is non-blocking. Due to these key restrictions, the resulting process network exhibits deterministic behavior that does not depend on the timing of computation nor on communication delays.”

Fig. 5 shows an example of a KPN. Note that all the nodes T1 through T4 may run simultaneously as they are separate processes. The key contribution of Kahn’s proposal was defining when a node would execute.

Fig. 5: Example of a Kahn Process Network (KPN) Fig. 5: Example of a Kahn Process Network (KPN)

As unbounded FIFO (first-in, first-out) channels are physically unrealizable, the AIE array implements a modified KPN where the channels are bounded. A well-designed system where all delays are balanced is still deterministic as possible stalls (caused by empty input buffers, full output buffers, or resource contention) always consume the same number of cycles.

A modified Kahn Process Network (KPN) desribed in an ADF (advanced data flow) graph encapsulates how the AIE tiles (the “nodes” in the modified KPN) exchange data with the “outside world”. In an AI engine array, the buffers (also called “edges”) are implemented as streams or shared memories. Note that a sequential process (also called a “node”) stalls that is, halts execution, when:

  • an input stream is empty

  • an output stream is full

  • a shared memory bank is being accessed by another tile

You can minimize stalls by allocating FIFOs of sufficient depth, or dedicating a memory bank to a kernel.

See AI Engine Programming: A Kahn Process Network Evolution (WP552) for more information.