pub enum Device {
Gpu(Arc<Context>),
Cpu,
Remote(String),
BrowserWorker(Arc<WsConn>),
Npu(Arc<dyn NpuBackend>),
}Expand description
A compute device in the fabric.
Variants§
Gpu(Arc<Context>)
Cpu
Remote(String)
A remote worker reached over TCP — a cloud node, or (with a WS bridge) a browser tab. Work crosses the boundary as host buffers, exactly like the GPU/CPU hop, so it’s the same fabric.
BrowserWorker(Arc<WsConn>)
A browser tab reached over a WebSocket, computing on the tab’s WebGPU. Same op frames as Remote, different transport — this is the fabric physically spanning cloud+local+browser.
Npu(Arc<dyn NpuBackend>)
An NPU reached through an execution-provider backend (CoreML/ANE, DirectML-QNN, OpenVINO, WebNN). WebGPU cannot target an NPU, so this only exists when a real backend is plugged in — it never falls back to the GPU/CPU silently.
Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Device
impl !UnwindSafe for Device
impl Freeze for Device
impl Send for Device
impl Sync for Device
impl Unpin for Device
impl UnsafeUnpin for Device
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more