C++ Templates

UForm Templates

FetchContent_Declare(uform GIT_REPOSITORY https://github.com/unum-cloud/UForm.git GIT_SHALLOW TRUE) bd07c64c

Ask your coding agent about this page, or add the docs server to it

curl -s 'https://www.unum.cloud/docs/uform/templates.md' | claude -p "How would this fit my code?"

include/uform/ holds the header-only templates and model implementations the C ABI is built from: the encoder towers and their kits, host media decoding, the GPU loaders, and the training engine with its mesh and collectives.

They serve advanced users composing their own towers, loaders or training loops rather than calling the library. These headers carry no stability promise: they change with the code that instantiates them, in any release, while the C ABI of c/uform/*.h and the C++ SDK of cpp/uform/*.hpp are versioned. Pin a commit, not a version, when building on them. src/ keeps the verbs over the C ABI, the dispatch and the units compiled per class.

Topics

InstallationCMake names the headers uform::header, which links uform::abi, and an install copies them beside the C headers, so find_package(uform) names it too.
Executorsstack_array keeps up to a compile-time count of elements inline, never relocating one once constructed, which is how every composition root owns one object per GPU.
DesignFamilies include one way, utilities ← encoder ← media ← loaders ← train, so a header reaches only the families to its left.