Skip to main content

Crate combs_core

Crate combs_core 

Source
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§

BufferPool
Facade over the GPU buffer pool.
DeviceCaps
Hardware capabilities consumed by the application-layer device planner (sharding, KV budget, prefill chunk sizing). Serialized to JSON across the FFI boundary.
DeviceInfo
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 device and 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() is submit_blocking on 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_DEVICE override.

Type Aliases§

CombsBackend
The default inference backend: autotuned, fusing wgpu/CubeCL backend (Fusion<CubeBackend<WgpuRuntime, f32, i32, u32>>).
CombsBackendF32
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.
CombsDevice
The default device handle type.