Expand description
§combs-core
Backend type aliases, device helpers, and the memory-pool facade for the Combs Engine L0 Rust core.
Phase 1 runs entirely on the wgpu backend (Metal on Apple Silicon) with f32 compute. f16 compute and custom CubeCL kernels are later-phase optimizations; the aliases here are the single place to change.
Re-exports§
pub use burn::backend::wgpu;
Modules§
- quant
- Group-wise 4-bit quantization support (GGUF
q4_0-style layout).
Structs§
- Buffer
Pool - Facade over the GPU buffer pool.
- Device
Caps - Hardware capabilities consumed by the application-layer device planner (sharding, KV budget, prefill chunk sizing). Serialized to JSON across the FFI boundary.
- Device
Info - Basic information about a wgpu adapter.
- GpuMemory
- GPU allocator state from cubecl’s memory manager (authoritative — process RSS is meaningless for unified-memory GPU accounting).
Functions§
- device_
caps - Queries the adapter for its limits/features and returns
DeviceCaps. - device_
info - Initializes the wgpu runtime for
deviceand returns adapter information. - gpu_
available - True when wgpu can see at least one adapter. Cached after the first probe. Initializing a cubecl device on an adapterless machine (e.g. a CI runner) panics in a worker thread, so GPU-dependent tests check this first and skip rather than fail.
- gpu_
memory - Samples the GPU allocator.
memory_usage()issubmit_blockingon the compute stream — call from the engine worker between generations (or rate-limited), not from request threads during a long prefill. - init_
device - Returns the default wgpu device (best available GPU; on macOS this is the
Metal device). Honors cubecl’s
CUBECL_WGPU_DEFAULT_DEVICEoverride.
Type Aliases§
- Combs
Backend - The default inference backend: autotuned, fusing wgpu/CubeCL backend
(
Fusion<CubeBackend<WgpuRuntime, f32, i32, u32>>). - Combs
Backend F32 - Always-f32 backend on the same wgpu runtime. The diffusion pipeline is pinned to it in every build: SD-1.5’s UNet/VAE collapse to black output under f16 (range, not rounding), so image generation computes in f32 regardless of the text stack’s dtype.
- Combs
Device - The default device handle type.