tracel-ai/burn · error

int_scatter with {other:?} update is not implemented

Error message

int_scatter with {other:?} update is not implemented

What it means

Unimplemented-operation guard in the ndarray backend's `int_scatter`: only certain `IndexingUpdateOp` variants (e.g., Assign/Add depending on the code path) are supported for scattering into integer tensors; the requested update op (`other`) has no ndarray implementation.

Source

Thrown at crates/burn-ndarray/src/ops/int_tensor.rs:298

                        dim, tensor, idx_array, value
                    ))
                })
            }
            burn_backend::tensor::IndexingUpdateOp::Assign => {
                execute_with_int_dtype!((tensor, value), I, |tensor, value| -> NdArrayTensor {
                    execute_with_int_dtype!(indices, |idx_array| NdArrayOps::<I>::scatter_assign(
                        dim, tensor, idx_array, value
                    ))
                })
            }
            burn_backend::tensor::IndexingUpdateOp::Mul => {
                execute_with_int_dtype!((tensor, value), I, |tensor, value| -> NdArrayTensor {
                    execute_with_int_dtype!(indices, |idx_array| NdArrayOps::<I>::scatter_mul(
                        dim, tensor, idx_array, value
                    ))
                })
            }
            other => unimplemented!("int_scatter with {other:?} update is not implemented"),
        }
    }

    fn int_scatter_nd(
        data: NdArrayTensor,
        indices: NdArrayTensor,
        values: NdArrayTensor,
        reduction: burn_backend::tensor::IndexingUpdateOp,
    ) -> NdArrayTensor {
        execute_with_int_dtype!((data, values), I, |data, values| -> NdArrayTensor {
            execute_with_int_dtype!(indices, |idx_array| NdArrayOps::<I>::scatter_nd(
                data, idx_array, values, reduction
            ))
        })
    }

    fn int_gather_nd(data: NdArrayTensor, indices: NdArrayTensor) -> NdArrayTensor {
        execute_with_int_dtype!(data, E, |array| -> NdArrayTensor {

View on GitHub (pinned to d16f7ba2ed)

Solutions

  1. Use a supported update op (e.g., Assign) for integer scatter
  2. Perform the multiplication manually: gather, multiply, then scatter-assign
  3. Implement the missing `IndexingUpdateOp` arm in burn-ndarray if needed
Defensive patterns

Strategy: fallback

When it happens

Trigger: Thrown at crates/burn-ndarray/src/ops/int_tensor.rs:298 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of tracel-ai/burn@d16f7ba2ed (2026-09-05). Data as JSON: /api/errors/57bddc388a6a74f9. Report an issue: GitHub.