torch-node.getGPUBackend
function getGPUBackend(): GPUBackendGet the configured GPU backend from environment.
Reads the TORCH_GPU_BACKEND environment variable and returns the corresponding
backend type. If not set or invalid, defaults to 'dawn'.
Returns
GPUBackend– The selected GPU backend typeExamples
// Returns 'wgpu-native' if TORCH_GPU_BACKEND=wgpu-native
const backend = getGPUBackend();
console.log(`Using GPU backend: ${backend}`);