Expand description
The built-in Vulkan backend’s FKC link_registry (kernel-seam-interop §3.5,
§4.3; FKC §12.6). The GPU analogue of fuel_dispatch::fkc::CpuLinkRegistry: maps
each Vulkan kernel contract’s entry_point symbol to the production dispatch
wrapper — the real, non-stub resolution the importer uses so an imported
contract binds the actual kernel (no raw pointers in the serialized
contract, FKC P9).
For the built-in Vulkan backend the wrappers live in
crate::vulkan_dispatch (the dispatch layer that adapts the Slang/SPIR-V
byte-kernels to KernelRef) and this table co-locates with them in
fuel-dispatch. An external provider instead exports its own link registry
across the FFI; this is Fuel’s internal Vulkan-provider analogue.
Everything here is gated behind the vulkan cargo feature — the DEFAULT
build never compiles this module.
Structs§
- Vulkan
Link Registry - The built-in Vulkan backend’s
LinkRegistry— resolves a contract’sentry_pointsymbols againstVULKAN_CAST_ENTRY_POINTS+VULKAN_ELEMENTWISE_ENTRY_POINTS+VULKAN_MATMUL_ENTRY_POINTS+VULKAN_CONV_ENTRY_POINTS(and the future Vulkan families as they migrate off their hand-written regs). Unresolved →None, which the importer turns into a typedUnknownEntryPointerror (never a panic, never a fabricated pointer).
Statics§
- VULKAN_
ATTENTION_ ENTRY_ POINTS - The Vulkan FlashAttention family’s
symbol → production wrappermap — the FULL family: 6 sections resolving to 6 distinct wrappers, keyed as 12 bindings (each section’salibi_slopesoptional-last fan doubles it). The forwardOpKind::FlashAttnat THREE per-dtype wrappers (flash_attn::flash_attn_{f32,bf16,f16}) + the three backward selectorsOpKind::FlashAttnBackward{Q,K,V}at f32-only wrappers (flash_attn::flash_attn_backward_{q,k,v}_f32). Contract:fuel-dispatch/kernel-contracts/vulkan/attention.fkc.md, authored per-(op, dtype) (the conv2d + CPU-attention per-dtype-section precedent). - VULKAN_
CAST_ ENTRY_ POINTS - The Vulkan cast (dtype-conversion) family’s
symbol → production wrappermap — the FULL family: 12 (SRC, DST) pairs resolving to 3 production wrappers. Contract:fuel-dispatch/kernel-contracts/vulkan/cast.fkc.md. Each per-pair section (## cast_f32_to_f16, …) declares a SPECIFIC single-dtypesrcinput + afixed(DST)output, so none of them dtype-fan — the importer resolves that symbol AS-IS and keys[SRC, DST](input dtype + the output’s fixed dtype), byte-for-byte the deleted hand-writtentable.register_with_precision(OpKind::Cast, &[src, dst], …)regs. TheOpParams::Castvariant is a unit marker (the target dtype rides on the output Storage), so it never enters the key. - VULKAN_
CONV_ ENTRY_ POINTS - The Vulkan conv2d family’s
symbol → production wrappermap — the FULL family: 3 per-(op, dtype)(Conv2D, [x, weight, out])wrapper bindings. Contract:fuel-dispatch/kernel-contracts/vulkan/conv.fkc.md, re-authored per-(op, dtype) (the matmul family’s per-combo precedent). Each section declares a single dtype per operand + apassthrough(x)output, so none of them dtype-fan — the importer keys[x, weight, out](inputs-then-output), byte-for-byte the deleted hand-writtentable.register_with_precision(OpKind::Conv2D, &[T, T, T], …)regs. - VULKAN_
ELEMENTWISE_ ENTRY_ POINTS - The Vulkan elementwise family’s
symbol → production wrappermap — the FULL family: 94 (op, dtype) keys resolving to the per-(op, dtype) wrappers incrate::vulkan_dispatch. Contract:fuel-dispatch/kernel-contracts/vulkan/elementwise.fkc.md, re-authored per-op (the CPU inplace precedent). The strided unary / affine sections declare a BASEentry_point(…::<op>/…::affine) +dtypes: [F32, F16, F64], so the importer fans them into<base>_{f32,f16,f64}— the symbols below. The binary sections fan[F32, F16, F64, BF16](all four strided, incl. the lane-maskedbinary_bf16). The bf16-unary /affine_bf16/clamp/powisections are single-dtype (resolved AS-IS on their full<op>_<dt>symbol). - VULKAN_
MATMUL_ ENTRY_ POINTS - The Vulkan matmul family’s
symbol → production wrappermap — the FULL family: 6 per-combo(MatMul, [lhs,rhs,out])wrapper bindings. Contract:fuel-dispatch/kernel-contracts/vulkan/matmul.fkc.md, re-authored per-combo (the cast family’s per-pair precedent). Each section declares a single dtype per operand - VULKAN_
MOVEMENT_ ENTRY_ POINTS - The Vulkan movement family’s
symbol → production wrappermap — the FULL family: 8 (op, dtype) keys across Concat (4) + CumSum (4). Contract:fuel-dispatch/kernel-contracts/vulkan/movement.fkc.md, authored per-op with dtype fan-out (§3.4). Each section declares a BASEentry_pointfanned over its dtype list, resolving<base>_<suffix>to each distinct per-dtype wrapper and keying[T, T](passthrough(input)output), byte-for-byte the deleted hand-writtenregister_with_caps_and_precision(OpKind::{Concat,CumSum}, …, strided, …)regs. - VULKAN_
NORM_ ENTRY_ POINTS - The Vulkan norm family’s
symbol → production wrappermap — the FULL family: 20 (op, dtype) keys across SoftmaxLastDim (4) + SoftmaxLastDimBackward (4) + LayerNormLastDim (4) + LayerNormLastDimBackward (4) + RmsNormLastDim (4). Contract:fuel-dispatch/kernel-contracts/vulkan/norm.fkc.md, authored per-op with dtype fan-out (§3.4). Each section fans a BASEentry_pointover[F32, F16, BF16, F64]to the DISTINCT per-dtype wrapper (softmax::*,norm::*), keying forward families[T, T]and backward families[T, T, T]([y,g,dx]/[x,g,dx], both inputs sharing the fanned list), byte-for-byte the deleted hand-writtenregister_with_precision(OpKind::{SoftmaxLastDim,…,RmsNormLastDim}, …)regs. Caps ride through contiguous-only (requires_contiguous⇒strided_input == false); precision is the audited nondeterministic none(reason) seed (per-row subgroup-tree FADD order). - VULKAN_
PAD_ COPY_ ENTRY_ POINTS - The Vulkan pad-copy family’s
symbol → production wrappermap — the FULL family: 21 (op, dtype) keys across Pad (6) + PadBackward (6) + Copy (9). Contract:fuel-dispatch/kernel-contracts/vulkan/pad-copy.fkc.md, authored per-op with dtype fan-out (§3.4). Each op is ONE dtype-agnostic wrapper (pad::pad_const/pad::pad_backward/copy_to_cpu_vulkan) that picks its byte-width from the dtype — so every fanned<base>_<suffix>symbol maps to the SAMEKernelRef(a synthetic-base umbrella, the pad_cpu precedent). Distinct dtype keys ⇒ legal sibling registrations of one wrapper, byte-for-byte the deleted hand-written regs. Caps ride through contiguous-only (requires_contiguous⇒strided_input == false); precision byte-exact (bitwise,max_ulp: 0). - VULKAN_
QMATMUL_ ENTRY_ POINTS - The Vulkan QMatMul family’s
symbol → production wrappermap — the FULL family: ONE(QMatMul, [F32, U32, F32])binding. Contract:fuel-dispatch/kernel-contracts/vulkan/qmatmul.fkc.md, authored as a single primitiveop_kind: QMatMulsection (the CPU quant-matmul primitive precedent + the linear-quant U8→U32 logical-weight reconciliation). The section declares a single dtype per operand (activationsF32,weightU32) + afixed(F32)output, so it does NOT dtype-fan — the importer keys[F32, U32, F32](inputs-then-output), byte-for-byte the deleted hand-writtentable.register_with_precision(OpKind::QMatMul, &[F32, U32, F32], …)reg. - VULKAN_
REDUCE_ ENTRY_ POINTS - The Vulkan reduce family’s
symbol → production wrappermap — the FULL family: 24 (op, dtype) keys across SumReduce / MaxReduce / MinReduce / MeanReduce (16, key[T, T]) + ArgMaxDim / ArgMinDim (8, key[T, U32]). Contract:fuel-dispatch/kernel-contracts/vulkan/reduce-prims.fkc.md, authored per-op with dtype fan-out (§3.4) — the production per-(op, dtype) binding model that supersedes the aspirationalvulkan/reduce.fkc.mdop-id-selector corpus. Each section fans a BASEentry_pointover[F32, F16, BF16, F64]to the DISTINCT per-dtype wrapper, byte-for-byte the deleted hand-writtenregister_with_precision(OpKind::{SumReduce,…,ArgMinDim}, …)regs. Caps ride through contiguous-only (requires_contiguous⇒strided_input == false); value reduces are audited nondeterministic none(reason), arg reduces bitwise exact. - VULKAN_
ROPE_ ENTRY_ POINTS - The Vulkan rope family’s
symbol → production wrappermap — the FULL family: 4 (Rope, [x, cos, sin, out]) per-dtype bindings. Contract:fuel-dispatch/kernel-contracts/vulkan/rope.fkc.md, authored with dtype fan-out (§3.4): the single section declares a BASEentry_pointfanned over[F32, F16, F64, BF16](thex+cos+sinoperands SHARE that list ⇒ they fan together), resolvingrope_<suffix>to each distinct per-dtype wrapper and keying the 4-slot[x, cos, sin, out](passthrough(x)output), byte-for-byte the deleted hand-writtenregister_with_caps_and_precision(OpKind::Rope, …, strided, …)regs. STRIDE-AWARE (strided: accepted⇒strided_input == true) — the caps-through-import proof; precision is the conservative UNAUDITED author seed (the elementwise pointwise precedent). - VULKAN_
SCATTER_ ENTRY_ POINTS - The Vulkan scatter family’s
symbol → production wrappermap — the FULL family: 8 (op, dtype) keys across IndexAdd (4) + ScatterAdd (4). Contract:fuel-dispatch/kernel-contracts/vulkan/scatter.fkc.md, authored per-op with dtype fan-out (§3.4). Each section declares a BASEentry_pointfanned over[F32, F64, BF16, F16](thebase+srcoperands SHARE that list ⇒ they fan together), so the importer resolves<base>_<suffix>and keys the 4-slot[base, U32, src, out](passthrough(base)output), byte-for-byte the deleted hand-writtenregister_with_precision(OpKind::{IndexAdd,ScatterAdd}, …)regs. - VULKAN_
SELECT_ ENTRY_ POINTS - The Vulkan select family’s
symbol → production wrappermap — the FULL family: 16 (op, dtype) keys across IndexSelect (4), Gather (6), MaskedFill (6). Contract:fuel-dispatch/kernel-contracts/vulkan/select.fkc.md, authored per-op (the conv/matmul per-combo precedent, with dtype fan-out §3.4). Each section declares a BASEentry_pointfanned over its dtype list, so the importer resolves<base>_<suffix>and keys[data, index, out](data dtype + fixed index dtype + passthrough(data) output), byte-for-byte the deleted hand-writtenregister_with_precision(OpKind::{IndexSelect,Gather,MaskedFill}, …)regs. - VULKAN_
SHAPE_ ENTRY_ POINTS - The Vulkan shape family’s
symbol → production wrappermap — the FULL family: 28 (op, dtype) keys across Triu (7) + Tril (7) + Flip (7) + Roll (7) over[F32, F16, BF16, F64, I32, U32, I64]. Contract:fuel-dispatch/kernel-contracts/vulkan/shape.fkc.md, authored per-op with dtype fan-out (§3.4). Each op is ONE dtype-agnostic wrapper (triangular::triu/triangular::tril/flip::flip/roll::roll) that picks its byte-width from the dtype — so every fanned<base>_<suffix>symbol maps to the SAMEKernelRef(a synthetic-base umbrella, the pad_cpu precedent). Distinct dtype keys ⇒ legal sibling registrations of one wrapper, byte-for-byte the deleted hand-written regs. - VULKAN_
WRITE_ SLICE_ ENTRY_ POINTS - The Vulkan write-slice family’s
symbol → production wrappermap — the FULL family: 18 (op, dtype) keys across WriteSlice (9) + WriteSliceRotating (9). Contract:fuel-dispatch/kernel-contracts/vulkan/write-slice.fkc.md, authored per-op with dtype fan-out (§3.4). BYTE-WIDTH-keyed: each op’s 9 dtype symbols collapse to FOUR wrappers by element size (b1/b2/b4/b8) — the cast family’s “several sections share one wrapper” precedent. The link registry maps each fanned<base>_<suffix>symbol to the byte-width wrapper for that dtype’s size, keying[T, T]byte-for-byte the deleted hand-writtenregister_with_precision(OpKind::{WriteSlice,WriteSliceRotating}, …)regs. Caps ride through contiguous-only (requires_contiguous⇒strided_input == false); precision byte-exact (bitwise,max_ulp: 0).