Skip to main content

Module artifact

Module artifact 

Source
Expand description

The crate-local precompiled XDNA artifact format.

The backend accepts a self-describing container carrying a prebuilt final.xclbin and its unfolded insts.bin (the XAie transaction stream), the entry point name, and the per-slot binding plan: the exact byte size of every runtime input and output. The sizes are load-bearing: the compiled transaction stream DMAs fixed tensor extents, so submit must reject a binding whose length differs from what the kernel will actually transfer (mirroring the OpenVINO backend’s per-slot byte_len check). This format is portable and unsafe-free: a host or tool builds it with encode and the backend parses it with PrecompiledArtifact::parse.

Layout (little-endian), header then payloads:

fieldbytes
magic b"XDNP"4
version (= 2)4
input count4
output count4
entry-name length4
xclbin length8
insts length8
per-slot byte sizes (inputs, then outputs)8 × (inputs + outputs)
entry-name bytesentry-name length
xclbin bytesxclbin length
insts bytesinsts length

Structs§

PrecompiledArtifact
A parsed precompiled artifact: borrowed payload views plus the owned per-slot binding plan.

Constants§

XDNA_PRECOMPILED_FORMAT
Artifact-format tag for a precompiled XDNA container (“XDNP” in ASCII).

Functions§

encode
Build a container from its parts (for hosts and tools producing precompiled artifacts). The slot sizes are the exact per-binding byte counts: inputs first, then outputs; the counts are derived from the two slices’ lengths.