ferrotensor-backend
The GPU compute layer of the LLM stack in Ferrotensor: a wgpu context
(WgpuContext), UnifiedTensor buffers, and the hand-written WGSL kernels in
src/*.wgsl behind ComputeEngine (tiled matmul, RoPE, RMSNorm, SiLU,
softmax, AdamW and SGD updates, losses, int8/affine dequantisation, flash
attention v2 forward and backward), plus a buffer pool. Runs on Metal and
Vulkan.
use ;
block_on;
Known issue (TODO): at the time of writing,
ComputeEngine::newfails with a WGSL parse error ("Invalid sub-access into type") on the currentmain, so this snippet andexamples/ops_test.rspanic. A fix is in progress; re-verify this example once it lands.
The separate ferrotensor crate has its own small kernel set; this crate is the
backend of ferrotensor-autograd, ferrotensor-graph and ferrotensor-trainer.