IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /max/get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /max/get-started.md).

Mojo function

scatter_nd

def scatter_nd[output_type: DType, indices_type: DType, //, target: StringSlice[ImmStaticOrigin] = StringSlice("cpu")](data: TileTensor[output_type, Storage=data.Storage, linear_idx_type=data.linear_idx_type], indices: TileTensor[indices_type, Storage=indices.Storage, linear_idx_type=indices.linear_idx_type], updates: TileTensor[output_type, Storage=updates.Storage, linear_idx_type=updates.linear_idx_type], output: TileTensor[output_type, Storage=output.Storage, linear_idx_type=output.linear_idx_type], context: DeviceContext)

Scatter_nd operation without any reduction.

Parameters:

  • ​output_type (DType): Element type of data, updates, and output.
  • ​indices_type (DType): Element type of the indices tensor.
  • ​target (StringSlice[ImmStaticOrigin]): Target backend to execute on, such as "cpu" or "cuda".

Args: