{"record":{"id":"b8be3326e60ec915","repo":"tracel-ai/burn","slug":"burn-device-device-str-requested-but-no-wgpu-fe","errorCode":null,"errorMessage":"BURN_DEVICE={device_str} requested, but no wgpu feature is enabled.","messagePattern":"BURN_DEVICE=(.+?) requested, but no wgpu feature is enabled\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/burn-dispatch/src/device.rs","lineNumber":254,"sourceCode":"                            \"BURN_DEVICE=cuda requested, but the 'cuda' feature is not enabled.\"\n                        );\n                    }\n                    \"rocm\" => {\n                        #[cfg(feature = \"rocm\")]\n                        return Self::Cube(CubeDevice::Hip(Default::default()));\n                        panic!(\n                            \"BURN_DEVICE=rocm requested, but the 'rocm' feature is not enabled.\"\n                        );\n                    }\n                    \"metal\" | \"vulkan\" | \"webgpu\" | \"wgpu\" => {\n                        #[cfg(any(\n                            feature = \"metal\",\n                            feature = \"vulkan\",\n                            feature = \"webgpu\",\n                            feature = \"wgpu\"\n                        ))]\n                        return Self::Cube(CubeDevice::Wgpu(Default::default()));\n                        panic!(\n                            \"BURN_DEVICE={device_str} requested, but no wgpu feature is enabled.\"\n                        );\n                    }\n                    \"cpu\" => {\n                        #[cfg(feature = \"cpu\")]\n                        return Self::Cube(CubeDevice::Cpu(Default::default()));\n                        panic!(\"BURN_DEVICE=cpu requested, but the 'cpu' feature is not enabled.\");\n                    }\n                    \"tch\" => {\n                        #[cfg(feature = \"tch\")]\n                        return Self::LibTorch(LibTorchDevice::default());\n                        panic!(\"BURN_DEVICE=tch requested, but the 'tch' feature is not enabled.\");\n                    }\n                    \"remote\" => {\n                        #[cfg(feature = \"remote\")]\n                        return Self::Remote(RemoteDevice::default());\n                        panic!(\n                            \"BURN_DEVICE=remote requested, but the 'remote' feature is not enabled.\"","sourceCodeStart":236,"sourceCodeEnd":272,"githubUrl":"https://github.com/tracel-ai/burn/blob/d16f7ba2ed0d41408189384044cc886fb4c8f957/crates/burn-dispatch/src/device.rs#L236-L272","documentation":"BURN_DEVICE selection guard for wgpu-family values (`metal`, `vulkan`, `webgpu`, `wgpu`): the constructor returns a wgpu cube device only when at least one of those wgpu features is compiled in; otherwise it panics with the requested string. It fires when the environment asks for a GPU runtime the binary lacks any backing feature for.","triggerScenarios":"Thrown at crates/burn-dispatch/src/device.rs:254 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Enable one of the wgpu features (metal, vulkan, webgpu, wgpu) and rebuild.","Set BURN_DEVICE to a backend available in the current build.","Unset BURN_DEVICE and rely on the default."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"d16f7ba2ed0d41408189384044cc886fb4c8f957","analyzedAt":"2026-09-05T13:19:14.260Z","contentChangedAt":"2026-09-05T13:19:14.260Z","schemaVersion":2},"datasetVersion":"2026-09-12T17:17:11.597Z"}