tracel-ai/burn · error
int_select_assign with {other:?} update is not implemented
Error message
int_select_assign with {other:?} update is not implemented What it means
int_select_assign on the CubeCl backend only supports IndexingUpdateOp::Add (kernel::select_assign) and IndexingUpdateOp::Mul (kernel::select_assign_mul). Any other update op variant falls into the catch-all arm and panics with this unimplemented! message. It is a backend feature gap, not a user data error.
Source
Thrown at crates/burn-cubecl/src/ops/int_tensor.rs:183
fn int_select_assign(
tensor: IntTensor<Self>,
dim: usize,
indices: IntTensor<Self>,
value: IntTensor<Self>,
update: burn_backend::tensor::IndexingUpdateOp,
) -> IntTensor<Self> {
match update {
burn_backend::tensor::IndexingUpdateOp::Assign => {
kernel::select_assign_replace(tensor, dim, indices, value)
}
burn_backend::tensor::IndexingUpdateOp::Add => {
kernel::select_assign(tensor, dim, indices, value, false)
}
burn_backend::tensor::IndexingUpdateOp::Mul => {
kernel::select_assign_mul(tensor, dim, indices, value)
}
other => {
unimplemented!("int_select_assign with {other:?} update is not implemented")
}
}
}
fn int_equal(
lhs: IntTensor<Self>,
rhs: IntTensor<Self>,
out_dtype: BoolDType,
) -> BoolTensor<Self> {
kernel::equal(lhs, rhs, out_dtype.into())
}
fn int_not_equal(
lhs: IntTensor<Self>,
rhs: IntTensor<Self>,
out_dtype: BoolDType,
) -> BoolTensor<Self> {
kernel::not_equal(lhs, rhs, out_dtype.into())View on GitHub (pinned to d16f7ba2ed)
Solutions
- Use a supported op: Add or Mul; emulate Sub by assigning the negated value with Add.
- Replace with gather/compute/scatter: gather at indices, apply the update, then select_assign with Add/Mul or slice_assign.
- Patch crates/burn-cubecl/src/ops/int_tensor.rs to dispatch the missing variant to a new int select_assign kernel.
- Check backend compatibility before using advanced indexing-update ops on IntTensors.
Example fix
// before let out = tensor.select_assign(dim, indices, updates, IndexingUpdateOp::Sub); // after let out = tensor.select_assign(dim, indices, -updates, IndexingUpdateOp::Add);
Defensive patterns
Strategy: validation
Validate before calling
if !matches!(op, IndexingUpdateOp::Add | IndexingUpdateOp::Mul) {
panic!("int_select_assign on CubeCl supports only Add/Mul, got {op:?}");
} Type guard
fn is_supported_select_op(op: &IndexingUpdateOp) -> bool {
matches!(op, IndexingUpdateOp::Add | IndexingUpdateOp::Mul)
} Prevention
- Restrict select_assign update ops to Add/Mul for IntTensors on CubeCl
- Convert subtraction updates to Add-of-negated before assigning
- Keep a compatibility table of ops vs backends in CI tests
- Prefer slice_assign for exotic update semantics
When it happens
Trigger: Calling int_select_assign (or Tensor::select_assign with an update op) on an IntTensor with the CubeCl backend while passing an IndexingUpdateOp other than Add or Mul (e.g. Sub).
Common situations: Using conditional assignment with subtraction updates on integer tensors; code that worked on a float backend or another backend being reused for int tensors; new op variants added upstream without int kernel support.
Related errors
- float_select_assign with {other:?} update is not implemented
- float_select_assign with {other:?} update is not implemented
- int_scatter with {other:?} update is not implemented
- unimplemented!()
- float_scatter with {other:?} update is not implemented
AI-assisted analysis of tracel-ai/burn@d16f7ba2ed (2026-09-05).
Data as JSON: /api/errors/1352a71a21a05d1a.
Report an issue: GitHub.