Skip to main content

Module forge_resize

Module forge_resize 

Source
Expand description

B2 — nearest NCHW resize via Forge on the auxiliary GPU circuit when available.

Uses existing OpNode::Resize2d / WGSL resize2d_main (certified against the same numerical contract as ops::resize_nearest_nchw_f32). Fail closed to caller (CPU path) on any adapter / forge error.

Device routing: vision SR runs on the auxiliary circuit (the iGPU when present) to keep the discrete GPU free for the LLM. The device comes from crate::gpu_context::device_registry::try_auxiliary_gpu, whose fallback chain is auxiliary → primary → CPU: on a single-GPU box it transparently uses the primary device, and on a GPU-less box it returns None, so this function fails closed and the caller degrades to the CPU oracle. It never panics.

Functions§

try_resize_nearest_shared_gpu
Attempt GPU resize on the process-wide shared device.