{"record":{"id":"661ac1cd8f6e3334","repo":"tracel-ai/burn","slug":"distributed-operations-are-not-supported-for-tenso-661ac1","errorCode":null,"errorMessage":"Distributed operations are not supported for tensor kind {other:?}","messagePattern":"Distributed operations are not supported for tensor kind (.+?)","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/burn-dispatch/src/ops/distributed.rs","lineNumber":142,"sourceCode":"                    $crate::DispatchTensorKind::$Backend($inner) => {\n                        let $crate::DispatchAutodiffContext::Enabled(checkpointing) = autodiff else {\n                            panic!(\"an autodiff float primitive must have an enabled autodiff context\")\n                        };\n                        with_autodiff_backend!($Backend, checkpointing, |B| {\n                            let $inner = $inner.autodiff();\n                            $crate::DispatchTensor {\n                                kind: $crate::DispatchTensorKind::Autodiff(alloc::boxed::Box::new(\n                                    $crate::DispatchTensorKind::$Backend(\n                                        $crate::BackendTensor::Autodiff($body),\n                                    ),\n                                )),\n                                autodiff,\n                            }\n                        })\n                    }\n                )*\n                #[allow(unreachable_patterns)]\n                other => panic!(\"Distributed operations are not supported for tensor kind {other:?}\"),\n            },\n            $(\n                #[cfg($cfg)]\n                $crate::DispatchTensorKind::$Backend($inner) => {\n                    assert_eq!(\n                        autodiff,\n                        $crate::DispatchAutodiffContext::Disabled,\n                        \"an enabled float tensor must use an autodiff primitive\",\n                    );\n                    type B = $crate::backends::$Backend;\n                    let $inner = $inner.float();\n                    $crate::DispatchTensor {\n                        kind: $crate::DispatchTensorKind::$Backend(\n                            $crate::BackendTensor::Float($body),\n                        ),\n                        autodiff,\n                    }\n                }","sourceCodeStart":124,"sourceCodeEnd":160,"githubUrl":"https://github.com/tracel-ai/burn/blob/d16f7ba2ed0d41408189384044cc886fb4c8f957/crates/burn-dispatch/src/ops/distributed.rs#L124-L160","documentation":"In the distributed float tensor dispatch macro, if a tensor's DispatchTensorKind matches no supported backend arm, the fallback panics 'Distributed operations are not supported for tensor kind {other:?}'.","triggerScenarios":"Dispatching a distributed op with a tensor whose kind variant corresponds to a backend not compiled in or not supported for distributed ops (e.g. a quantized/Qtensor kind or a disabled backend).","commonSituations":"Passing quantized or feature-gated tensors to distributed collectives; feature flags changed between build and tensor creation.","solutions":["Enable the backend feature matching the tensor kind","Convert the tensor to a supported float backend tensor before the distributed op","Do not pass quantized tensors to distributed ops; dequantize first if supported"],"exampleFix":"// before\nall_reduce(qtensor);\n// after\nall_reduce(qtensor.dequantize().to_dtype(FloatDType::F32));","handlingStrategy":"validation","validationCode":"fn is_supported_float_kind(k: &DispatchTensorKind) -> bool {\n    matches!(k, DispatchTensorKind::Cpu(_) | DispatchTensorKind::Wgpu(_) | DispatchTensorKind::Autodiff(_))\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Don't pass quantized tensors to distributed collectives","Enable backend features matching every tensor in flight","Convert/dequantize to a supported float kind before collective ops"],"tags":["rust","distributed","tensor-kind","panic","burn"],"backgroundTag":"unsupported-device-backend","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"}