Skip to main content

Mojo function

scatter_elements

scatter_elements[reduce_fn: def[dtype: DType, width: Int](SIMD[dtype, width], SIMD[dtype, width]) capturing -> SIMD[dtype, width], rank: Int, input_type: DType, indices_type: DType](input: ManagedTensorSlice[input.io_spec, static_spec=input.static_spec], indices: ManagedTensorSlice[indices.io_spec, static_spec=indices.static_spec], updates: ManagedTensorSlice[updates.io_spec, static_spec=updates.static_spec], _axis: Int, output: ManagedTensorSlice[output.io_spec, static_spec=output.static_spec])

Implements ONNX ScatterElements op which is equivalent to Pytorch scatter.

Was this page helpful?