fn
scatter_set_op
→TensorImplPtrint scatter_set_op(const int & base, const int & indices, const int & src, int dim)scatter_set: out[..., index[i], ...] = src[..., i, ...] along dim (overwrite). A copy of base with the indexed slices replaced by src — the single-op primitive that index_copy routes through.
Parameters
base, indices, src, dimSame semantics as
scatter_add_op.Returns
TensorImplPtrSame shape and dtype as base.
Notes
Gradients: except at overwritten positions where it is 0; (a plain gather). Duplicate indices follow the reference framework's last-writer-wins convention.