Skip to main content

Module gpu

Module gpu 

Source
Expand description

Vision GPU dispatch facade — specialized_libs::computer_vision::gpu.

Modules§

dispatch
Dispatch vision ops to CPU oracle (always) or GPU when feature lands (A1/A2).
forge_bicubic
Bicubic (Keys a=-0.5) NCHW f32 resize via Forge WGSL on the auxiliary GPU circuit.
forge_resize
B2 — nearest NCHW resize via Forge on the auxiliary GPU circuit when available.
policy
Thermal / VRAM dynamic policy for vision workloads driven by the host ThermalGovernor.

Structs§

VisionComputeReport
VisionVramBudget
Dynamic VRAM budget for vision tiles (bytes) derived from host thermal state.

Enums§

ThermalHint
Coarse thermal hint from host (maps from ThermalGovernor).
VisionComputeDevice
Device that executed the op.

Constants§

BICUBIC_ENTRY

Functions§

avg_pool2d_dispatch
Avg-pool dispatch wrapping the CPU oracle.
bicubic2d_cpu
CPU bicubic NCHW oracle (same Keys weights as WGSL).
bicubic2d_wgsl
WGSL bicubic upsample. params u32: [c, h_in, w_in, h_out, w_out, 0, 0, 0].
conv2d_nchw_dispatch
Conv2d NCHW dispatch (CPU oracle; GPU when A2 Forge lands).
max_pool2d_dispatch
Max-pool dispatch wrapping the CPU oracle.
resize_nearest_nchw_dispatch
Prefer GPU when prefer_gpu: try Forge Resize2d on shared_gpu, else CPU.
thermal_allows_gpu_tiles
Whether GPU tile work is allowed under thermal state.
try_resize_bicubic_shared_gpu
Attempt bicubic NCHW resize on the auxiliary GPU circuit (iGPU when present; falls back auxiliary → primary → CPU). Returns Err(BackendUnavailable) on a GPU-less box so the caller degrades to the CPU oracle. Never panics.
try_resize_nearest_shared_gpu
Attempt GPU resize on the process-wide shared device.