Expand description
Shared GPU context and VRAM ledger for LLM + tensor + render coexistence.
Compute universes (Track B2): logical partitions on one physical adapter —
pinned ledger slots and queue lanes, not multiple GPUDevice instances.
Qualia-native bindings (graph–tensor SOA, Phase-8 SPSC, Sentinel, ledger pins)
live in compute_universe.rs — this module owns VRAM accounting and shared_gpu().
Operational modes: Full, Eco, Reserve (no heap in hot-path accounting).
Modules§
- device_
registry - Device-per-circuit registry — obtain a
wgpu::Devicefor a SPECIFIC adapter/circuit (e.g. the integrated GPU), not just the single process-wide primary (STELLAR H3 foundation). Native only; mirrorstry_shared_gpu— never panics on a missing/failed device. Device-per-circuit registry — obtain awgpu::Devicefor a SPECIFIC adapter/circuit (STELLAR §A H3 foundation for heterogeneous GPU routing).
Structs§
- GpuAdapter
Caps - GpuFeature
Caps - GpuLimit
Caps - Shared
GpuContext - Universe
Orchestrator - Orchestrator enforces pinned boundaries on one adapter (Full / Eco / Reserve degrade per universe).
- Universe
Partition - Hermetic partition: universe ↔ ledger bounds ↔ queue preference.
- Vram
Byte Range - Immutable consecutive byte range in the logical VRAM ledger (no overlap between universes).
- Vram
Ledger - Zero-heap VRAM budget tracker (bytes, atomics).
Enums§
- Compute
Universe - Parallel compute plane on shared silicon (maps to 10D q / w semantics).
- Operational
Mode - Desktop / portal operational mode (thermal + VRAM driven).
- Queue
Lane - Preferred async queue on the single
wgpu::Device(spatial concurrency, not MIG). - Vram
Ledger Slot - Pinned VRAM accounting bucket (zero-copy crossover between universes reads, not writes).
Functions§
- ambient_
draw_ instances - Live ledger hook for per-frame draw throttling (no buffer resize).
- ambient_
draw_ instances_ for_ mode - Zero-heap ambient draw throttle — static SSBO, dynamic
instance_count(instant step-down). - global_
universe_ orchestrator - Alias retained for orchestration call sites.
- global_
vram_ ledger - qualia_
backend_ override - An explicit GPU-backend override for the inference device.
- recommend_
inference_ backend - Capability-aware recommendation for which GPU backend this machine should run inference on (advisory; surfaced by the doctor/setup checker). Prefers the portable, vendor-neutral path so the build is not silently locked to Windows (DX12) or NVIDIA (CUDA). Reactive to the adapter actually in hand; a full enumerate-all-backends-and-pick is the next layer.
- record_
bake_ pulse - Tensor / Quin bake or encode event.
- record_
context_ ring_ drop - Context inject ring full — lossy drop rather than stalling U0.
- record_
draft_ acceptance - Topological speculative decode: accepted draft tokens this step (B3.1e).
- record_
llm_ decode_ step - Called once per autoregressive decode step (gguf_bridge hot loop).
- record_
logic_ flash - SPARQL / GeoSPARQL / rule resolution flash.
- record_
network_ ripple - Mesh / network I/O ripple (daemon fetch, torrent, etc.).
- record_
producer_ cycle - U1 background producer completed a kNN inject cycle (B3.3).
- sample_
ambient_ telemetry - Portal + desktop ambient field sampling (48 B contract subset).
- shared_
gpu - Process-wide wgpu device + queue (lazy init). Panics if no GPU is available —
use only where a device is genuinely mandatory. Prefer
try_shared_gpuon any path that can fall back to CPU. - try_
shared_ gpu - Process-wide wgpu device + queue, or
Nonewhen no usable GPU adapter exists (headless / integrated-only / GPU-less machine, or the tokio runtime can’t start). - universe_
orchestrator - Universe map derived from adapter budget + live operational mode (recomputed; 3 partitions).
- viewport_
operational_ mode - U2-effective operational mode from live
VramLedgerpressure.