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