A GPU training toolchain for one machine, written down
so the reasoning survives.
redbluegreen is a GPU training toolchain for the AMD
Strix Halo APU. We build it from the kernel interface up with no
GPU userspace under it.
The seven layers in dependency order. Units 1 to 5b built
layers 1 and 2 and the first two kernels; layers 3 to 7 do not exist
yet.
The seven layers, in dependency order:
kfd and queue
memory
kernels
autograd
optimizer
loop
data resident in GPU memory
Each layer uses only the layer below it. Nothing above layer 3
exists yet.
The units so far:
Talk to the driver: GET_VERSION and ACQUIRE_VM.
Own memory: ALLOC, MAP and a host view.
Own the queue: Drop types, an
AQL queue and an
event.
Dispatch one kernel that writes 42.
Add two vectors at 225 GB/s.
The toolchain has zero external dependencies at run time. The
build needs llvm-mc and
llvm-objcopy to assemble kernels, and rustc. There are no crates.