torch.DeviceType
export type DeviceType = 'webgpu' | 'cpu';Values
'webgpu''cpu'
Device management for automatic CPU fallback.
When WebGPU is not available, torch.js automatically falls back to CPU mode. This module provides APIs to query and control the default device.