{"record":{"id":"b1cf51f5246eb681","repo":"tracel-ai/burn","slug":"float-select-assign-with-other-update-is-not-i","errorCode":null,"errorMessage":"float_select_assign with {other:?} update is not implemented","messagePattern":"float_select_assign with (.+?) update is not implemented","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/burn-autodiff/src/ops/tensor.rs","lineNumber":1964,"sourceCode":"                                tensor.primitive,\n                                dim,\n                                indices,\n                                value.primitive,\n                                IndexingUpdateOp::Mul,\n                            ),\n                        )\n                    }\n                    OpsKind::UnTracked(prep) => prep.finish(B::float_select_assign(\n                        tensor.primitive,\n                        dim,\n                        indices,\n                        value.primitive,\n                        IndexingUpdateOp::Mul,\n                    )),\n                }\n            }\n            other => {\n                unimplemented!(\"float_select_assign with {other:?} update is not implemented\")\n            }\n        }\n    }\n\n    fn float_slice(tensor: FloatTensor<Self>, slices: &[Slice]) -> FloatTensor<Self> {\n        #[derive(Debug)]\n        struct Index;\n\n        #[derive(new, Debug)]\n        struct RetroSlice<B: Backend> {\n            tensor_id: NodeId,\n            slices: Vec<Slice>,\n            _backend: PhantomData<B>,\n        }\n\n        impl<B: Backend> RetroForward for RetroSlice<B> {\n            fn forward(&self, states: &mut BackwardStates, out_node: NodeId) {\n                let tensor = states.get_state::<B::FloatTensorPrimitive>(&self.tensor_id);","sourceCodeStart":1946,"sourceCodeEnd":1982,"githubUrl":"https://github.com/tracel-ai/burn/blob/d16f7ba2ed0d41408189384044cc886fb4c8f957/crates/burn-autodiff/src/ops/tensor.rs#L1946-L1982","documentation":"In the autodiff backend's float_select_assign (crates/burn-autodiff/src/ops/tensor.rs:1964), only Add/Sub/Mul IndexingUpdateOps have gradient implementations; any other update op hits the catch-all arm and panics with unimplemented!(\"float_select_assign with {other:?} update is not implemented\").","triggerScenarios":"Calling Tensor::select_assign (or float_select_assign) with an IndexingUpdateOp other than Add, Sub, or Mul under burn-autodiff.","commonSituations":"Assign-style index updates inside a training loop (e.g. updating embeddings by direct assignment); the same op works forward-only but panics when gradients are tracked.","solutions":["Use Add/Sub/Mul select_assign updates in autodiff-tracked code.","Detach the tensor (no gradient tracking) before performing the unsupported update.","Implement the missing gradient rule for the update op in burn-autodiff."],"exampleFix":"// before\nembeddings.select_assign(0, indices, updates, IndexingUpdateOp::Assign);\n// after\nembeddings.select_assign(0, indices, updates, IndexingUpdateOp::Add);","handlingStrategy":"validation","validationCode":"assert!(matches!(op, IndexingUpdateOp::Add | IndexingUpdateOp::Sub | IndexingUpdateOp::Mul), \"autodiff select_assign only supports Add/Sub/Mul\");","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Use Add-based index updates (scatter-add pattern) in differentiable code.","Detach tensors before assignment-style updates.","Audit embedding-style update code for Assign ops when training."],"tags":["rust","burn","autodiff","select-assign","unimplemented"],"backgroundTag":"op-not-implemented-for-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"}