Skip to main content

Mojo function

scatter_elements_shape

scatter_elements_shape[input_type: DType, indices_type: DType, //, *, single_thread_blocking_override: Bool](input: LayoutTensor[input_type, layout, origin, address_space=address_space, element_layout=element_layout, layout_int_type=layout_int_type, linear_idx_type=linear_idx_type, masked=masked, alignment=alignment], updates: LayoutTensor[input_type, layout, origin, address_space=address_space, element_layout=element_layout, layout_int_type=layout_int_type, linear_idx_type=linear_idx_type, masked=masked, alignment=alignment], indices: LayoutTensor[indices_type, layout, origin, address_space=address_space, element_layout=element_layout, layout_int_type=layout_int_type, linear_idx_type=linear_idx_type, masked=masked, alignment=alignment], axis: Int) -> IndexList[layout.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.
  • single_thread_blocking_override (Bool): If True, then the operation is run synchronously using a single thread.

Args:

Returns:

IndexList: The output shape.

Was this page helpful?