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_elements_shape

def scatter_elements_shape[input_type: DType, indices_type: DType](input: TileTensor[input_type, Storage=input.Storage, address_space=input.address_space, linear_idx_type=input.linear_idx_type, element_size=input.element_size], updates: TileTensor[input_type, Storage=updates.Storage, address_space=updates.address_space, linear_idx_type=updates.linear_idx_type, element_size=updates.element_size], indices: TileTensor[indices_type, Storage=indices.Storage, address_space=indices.address_space, linear_idx_type=indices.linear_idx_type, element_size=indices.element_size], axis: Int) -> IndexList[input.LayoutType.rank]

Compute the output shape of a scatter_elements operation, and assert the inputs are compatible.

Parameters:

  • ​input_type (DType): Type of the input tensor.
  • ​indices_type (DType): Type of the indices tensor.

Args:

Returns:

IndexList[input.LayoutType.rank]: The output shape.