{"record":{"id":"ee571a08b2382f9c","repo":"tracel-ai/burn","slug":"float-scatter-with-other-update-is-not-impleme","errorCode":null,"errorMessage":"float_scatter with {other:?} update is not implemented","messagePattern":"float_scatter with (.+?) update is not implemented","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/burn-cubecl/src/ops/tensor.rs","lineNumber":194,"sourceCode":"\n    fn float_scatter(\n        dim: usize,\n        tensor: FloatTensor<Self>,\n        indices: IntTensor<Self>,\n        value: FloatTensor<Self>,\n        update: burn_backend::tensor::IndexingUpdateOp,\n    ) -> FloatTensor<Self> {\n        match update {\n            burn_backend::tensor::IndexingUpdateOp::Assign => {\n                kernel::scatter_assign(dim, tensor, indices, value)\n            }\n            burn_backend::tensor::IndexingUpdateOp::Add => {\n                kernel::scatter(dim, tensor, indices, value, false)\n            }\n            burn_backend::tensor::IndexingUpdateOp::Mul => {\n                kernel::scatter_mul(dim, tensor, indices, value)\n            }\n            other => unimplemented!(\"float_scatter with {other:?} update is not implemented\"),\n        }\n    }\n\n    fn float_scatter_nd(\n        data: FloatTensor<Self>,\n        indices: IntTensor<Self>,\n        values: FloatTensor<Self>,\n        reduction: burn_backend::tensor::IndexingUpdateOp,\n    ) -> FloatTensor<Self> {\n        kernel::scatter_nd(data, indices, values, reduction)\n    }\n\n    fn float_gather_nd(data: FloatTensor<Self>, indices: IntTensor<Self>) -> FloatTensor<Self> {\n        kernel::gather_nd(data, indices)\n    }\n\n    fn float_select(\n        tensor: FloatTensor<Self>,","sourceCodeStart":176,"sourceCodeEnd":212,"githubUrl":"https://github.com/tracel-ai/burn/blob/d16f7ba2ed0d41408189384044cc886fb4c8f957/crates/burn-cubecl/src/ops/tensor.rs#L176-L212","documentation":"float_scatter on the CubeCl backend implements only IndexingUpdateOp::Add and IndexingUpdateOp::Mul. Other update-op variants hit the catch-all arm and panic with unimplemented!. Like the int variant, this is a deliberate backend feature boundary.","triggerScenarios":"Calling float_scatter (or Tensor::scatter) on a FloatTensor with the CubeCl backend using an IndexingUpdateOp other than Add/Mul, e.g. Sub or Max.","commonSituations":"Scatter-subtract gradients or custom scatter-reduce semantics; porting NumPy/torch scatter_reduce code with 'subtract' reduction; new IndexingUpdateOp variants added upstream without a CubeCl float kernel.","solutions":["Emulate Sub via Add with negated update values (works for floats).","Use slice_assign with gathered/computed index regions for arbitrary update semantics.","Implement the missing arm with a new CubeCl float scatter kernel and submit upstream.","Check the burn docs/issue tracker for which IndexingUpdateOp variants your backend supports."],"exampleFix":"// before\nlet out = tensor.scatter(1, indices, updates, IndexingUpdateOp::Sub);\n// after\nlet out = tensor.scatter(1, indices, -updates, IndexingUpdateOp::Add);","handlingStrategy":"validation","validationCode":"fn assert_scatter_op_supported(op: &IndexingUpdateOp) {\n    assert!(\n        matches!(op, IndexingUpdateOp::Add | IndexingUpdateOp::Mul),\n        \"float_scatter on CubeCl supports only Add/Mul\"\n    );\n}","typeGuard":"fn is_supported_scatter_op(op: &IndexingUpdateOp) -> bool {\n    matches!(op, IndexingUpdateOp::Add | IndexingUpdateOp::Mul)\n}","tryCatchPattern":null,"preventionTips":["Use only Add/Mul for float scatter on CubeCl","Negate values and use Add to express subtraction","Test scatter paths on every backend you ship","Follow burn issue tracker for new IndexingUpdateOp kernel support"],"tags":["rust","burn","cubecl","scatter","unimplemented"],"backgroundTag":"unsupported-op-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"}