Mojo function
gather_shape
gather_shape[output_rank: Int, input_type: DType, indices_type: DType, single_thread_blocking_override: Bool = False](input_buf: TileTensor[input_type, input_buf.LayoutType, input_buf.origin, address_space=input_buf.address_space, linear_idx_type=input_buf.linear_idx_type, element_shape_types=input_buf.element_shape_types], indices_buf: TileTensor[indices_type, indices_buf.LayoutType, indices_buf.origin, address_space=indices_buf.address_space, linear_idx_type=indices_buf.linear_idx_type, element_shape_types=indices_buf.element_shape_types], axis: Int) -> 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. - single_thread_blocking_override (
Bool): If True, then the operation is run synchronously using a single thread.
Args:
- input_buf (
TileTensor): The input tensor. - indices_buf (
TileTensor): 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!