{"record":{"id":"430451f618770676","repo":"tracel-ai/burn","slug":"float-scatter-nd-is-not-implemented-for-this-backe","errorCode":null,"errorMessage":"float_scatter_nd is not implemented for this backend","messagePattern":"float_scatter_nd is not implemented for this backend","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/burn-backend/src/backend/ops/tensor.rs","lineNumber":512,"sourceCode":"    /// Multi-dimensional scatter: update `data` at locations specified by `indices` with `values`.\n    ///\n    /// # Arguments\n    ///\n    /// * `data` - The tensor to scatter into.\n    /// * `indices` - An M-dimensional integer tensor whose last dimension indexes into `data`.\n    /// * `values` - The values to scatter.\n    /// * `reduction` - How to combine with existing values.\n    ///\n    /// # Returns\n    ///\n    /// The tensor with scattered values.\n    fn float_scatter_nd(\n        _data: FloatTensor<B>,\n        _indices: IntTensor<B>,\n        _values: FloatTensor<B>,\n        _reduction: crate::tensor::IndexingUpdateOp,\n    ) -> FloatTensor<B> {\n        unimplemented!(\"float_scatter_nd is not implemented for this backend\")\n    }\n\n    /// Multi-dimensional gather: collect slices from `data` at locations specified by `indices`.\n    ///\n    /// # Arguments\n    ///\n    /// * `data` - The tensor to gather from.\n    /// * `indices` - An M-dimensional integer tensor whose last dimension indexes into `data`.\n    ///\n    /// # Returns\n    ///\n    /// The gathered tensor.\n    fn float_gather_nd(_data: FloatTensor<B>, _indices: IntTensor<B>) -> FloatTensor<B> {\n        unimplemented!(\"float_gather_nd is not implemented for this backend\")\n    }\n\n    /// Select tensor elements along the given dimension corresponding for the given indices.\n    ///","sourceCodeStart":494,"sourceCodeEnd":530,"githubUrl":"https://github.com/tracel-ai/burn/blob/d16f7ba2ed0d41408189384044cc886fb4c8f957/crates/burn-backend/src/backend/ops/tensor.rs#L494-L530","documentation":"`float_scatter_nd` is a default trait method for multi-dimensional scatter on float tensors; its default body panics with `unimplemented!(\"float_scatter_nd is not implemented for this backend\")`. The active backend has not overridden this optional op.","triggerScenarios":"Calling `float_scatter_nd(data, indices, values, reduction)` (ScatterNd on Float tensors) on a backend lacking the override.","commonSituations":"Porting TF/ONNX models with `ScatterNd` updates (e.g. optimizer-side updates, embedding updates) to a minimal or fused backend.","solutions":["Switch to a backend that implements `float_scatter_nd`.","Implement `float_scatter_nd` in your backend.","Rewrite using supported ops: flatten data and use index-based select/scatter along a single dimension."],"exampleFix":"// before\nlet out = B::float_scatter_nd(data, indices, updates, IndexingUpdateOp::Update); // panics\n\n// after\n// implement in backend or express via supported primitives:\nfn float_scatter_nd(...) -> FloatTensor<Self> { /* real implementation */ }","handlingStrategy":"fallback","validationCode":"// Confirm the target backend implements float_scatter_nd (check its source or capability list) before emitting the op","typeGuard":null,"tryCatchPattern":"let out = std::panic::catch_unwind(|| B::float_scatter_nd(d, i, v, op))\n    .unwrap_or_else(|_| float_scatter_nd_fallback(d, i, v, op));","preventionTips":["Verify backend op coverage when switching backends.","Maintain portable scatter_nd fallbacks composed of supported primitives.","Add per-backend integration tests for ScatterNd-using models."],"tags":["rust","scatter","float-tensor","unimplemented-stub"],"backgroundTag":"backend-method-unimplemented","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"}