Skip to main content

gpu_scope

Function gpu_scope 

Source
pub fn gpu_scope<R>(f: impl FnOnce() -> R) -> R
Expand description

Temporarily turn the CPU-only gate back ON inside a held enter_cpu_scope (the host tail holds one for its per-op layers). The pooled tail’s own device frames are explicitly device-owned — the same escape hatch the MiniCPM prepared frame documents — and must not be declined by the surrounding scope. Restores the previous flag on drop.