tracel-ai/burn · error
unimplemented!("float_scatter with {other:?} update is not i
Error message
unimplemented!("float_scatter with {other:?} update is not implemented") What it means
In the autodiff backend's float_scatter (crates/burn-autodiff/src/ops/tensor.rs:1262), only Add/Sub/Mul update ops are matched for the scatter's IndexingUpdateOp; any other update op falls into the catch-all arm and panics with unimplemented!("float_scatter with {other:?} update is not implemented").
Source
Thrown at crates/burn-autodiff/src/ops/tensor.rs:1262
B::float_scatter(
dim,
tensor.primitive,
indices,
value.primitive,
IndexingUpdateOp::Mul,
),
)
}
OpsKind::UnTracked(prep) => prep.finish(B::float_scatter(
dim,
tensor.primitive,
indices,
value.primitive,
IndexingUpdateOp::Mul,
)),
}
}
other => unimplemented!("float_scatter with {other:?} update is not implemented"),
}
}
fn float_scatter_nd(
data: FloatTensor<Self>,
indices: IntTensor<B>,
values: FloatTensor<Self>,
reduction: burn_backend::tensor::IndexingUpdateOp,
) -> FloatTensor<Self> {
use burn_backend::tensor::IndexingUpdateOp;
match reduction {
IndexingUpdateOp::Add => {
#[derive(Debug)]
struct ScatterNdAdd;
impl<B: Backend> Backward<B, 2> for ScatterNdAdd {
type State = IntTensor<B>;View on GitHub (pinned to d16f7ba2ed)
Solutions
- Restrict scatter updates to Add, Sub, or Mul inside training (autodiff) code.
- Perform unsupported scatter updates outside the autodiff graph (e.g. under no_grad / on non-grad tensors).
- Add a gradient rule for the missing IndexingUpdateOp in burn-autodiff and upstream it.
Example fix
// before tensor.scatter(1, indices, value, IndexingUpdateOp::Assign); // after tensor.scatter(1, indices, value, IndexingUpdateOp::Add);
Defensive patterns
Strategy: validation
Validate before calling
assert!(matches!(op, IndexingUpdateOp::Add | IndexingUpdateOp::Sub | IndexingUpdateOp::Mul), "autodiff float_scatter only supports Add/Sub/Mul");
Prevention
- Restrict scatter update ops to Add/Sub/Mul in training code.
- Perform unsupported scatter updates outside gradient tracking.
- Search burn-autodiff's indexing ops for the supported update list before adding new scatter uses.
When it happens
Trigger: Calling Tensor::scatter with an IndexingUpdateOp other than Add, Sub, or Mul while running under burn-autodiff (training mode).
Common situations: Using exotic scatter update semantics (e.g. custom assignment/max updates) during gradient computation; forward-only code on the base backend may work but the autodiff wrapper panics.
Related errors
- float_select_assign with {other:?} update is not implemented
- int_scatter with {other:?} update is not implemented
- float_scatter with {other:?} update is not implemented
- Node {:?} is needed but never checkpointed
- Can't differentiate avg pool 2d backward.
AI-assisted analysis of tracel-ai/burn@d16f7ba2ed (2026-09-05).
Data as JSON: /api/errors/c82e1f5716456f69.
Report an issue: GitHub.