Expand description
Dispatch wrappers + registration for Vulkan-backed kernels.
Sibling to baracuda_dispatch (CUDA) and the CPU dispatch in
dispatch.rs. Each kernel registers as an alternative at the
(op_kind, dtypes, BackendId::Vulkan) decision point in the
shared KernelBindingTable.
§V.1 status
Phase 7.6 step 9c Vulkan catch-up V.1.C — the proof-of-life
milestone. One op (Add f32) wired end-to-end through the
pipelined-executor binding-table dispatch:
- The executor’s
fuel_dispatch::pipelined::execute_work_itemoutput- allocation match arm seesBackendId::Vulkanand allocates viafuel_vulkan_backend::VulkanBackend::alloc_bytes_handle(V.1.B). - The kernel wrapper here reads inputs (also
VulkanStorageByteswith backend handle attached), pulls the backend Arc from the first input, and callsfuel_vulkan_backend::VulkanBackend::binary_add_f32_bytesto dispatch. - The Slang
binary.spvkernel runs on the Vulkan device; the pre-allocated output buffer carries the result.
V.2 fans out registrations to the ~25 already-compiled SPIR-V
kernels in fuel-vulkan-kernels. V.3 writes new Slang for the
kernel families CUDA has and Vulkan doesn’t.
Modules§
- affine
- arg_
reduce - attention
- binary
- binary_
bf16 - binary_
f16 - binary_
f64 - cast
- cast_
f8e4m3 - clamp
- concat
- conv2d
- cumsum
- flash_
attn - flip
- gather
- index_
add - indexing
- masked_
fill - matmul
- norm
- pad
- powi
- qmatmul
- reduce
- roll
- scatter_
add - softmax
- triangular
- unary
- unary_
bf16 - unary_
f16 - unary_
f64 - write_
slice - write_
slice_ rotating
Functions§
- copy_
to_ cpu_ vulkan - Dispatch wrapper for
(OpKind::Copy, [T, T], Vulkan)— D2H from a Vulkan source storage into a freshly-allocated CPU output. The executor allocates the CPU output before this wrapper runs (seefuel_dispatch::pipelined::WorkItemKind::Copy); the wrapper callsVulkanBackend::download_byteson the input’s attached backend handle and copies the result into the CPU storage. - register_
vulkan_ kernels - Register every Vulkan kernel wrapper against its
(OpKind, dtypes, BackendId::Vulkan)decision-point key in the sharedKernelBindingTable. Each wrapper appears as an alternative alongside any CPU / CUDA / future-backend registrations at the same key. The route picker (architecture v1.0 §04) selects among them at plan time based on input residency + telemetry.