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[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].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:
- input (
LayoutTensor): The input tensor. - updates (
LayoutTensor): The input tensor. - indices (
LayoutTensor): The indices tensor. - axis (
Int): The axis.
Returns:
IndexList: The output shape.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!