Skip to main content

Mojo function

gather_nd_shape

gather_nd_shape[output_rank: Int, input_type: DType, indices_type: DType, batch_dims: Int, single_thread_blocking_override: Bool = True](input_buf: TileTensor[input_type, LayoutType, origin, address_space=address_space, linear_idx_type=linear_idx_type, element_shape_types=element_shape_types], indices_buf: TileTensor[indices_type, LayoutType, origin, address_space=address_space, linear_idx_type=linear_idx_type, element_shape_types=element_shape_types]) -> IndexList[output_rank]

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

Parameters:

  • output_rank (Int): Rank of the output tensor.
  • input_type (DType): Type of the input tensor.
  • indices_type (DType): Type of the indices tensor.
  • batch_dims (Int): Batch dimensions.
  • single_thread_blocking_override (Bool): If True, then reduction is run synchronously using a single thread.

Args:

Returns:

IndexList: The output shape.

Was this page helpful?