Mojo function
index_tensor_shape
index_tensor_shape[output_rank: Int, input_type: DType, indices_type: DType, batch_dims: Int, single_thread_blocking_override: Bool = True](input_buf: TileTensor[input_type, address_space=input_buf.address_space, linear_idx_type=input_buf.linear_idx_type, element_size=input_buf.element_size], indices_buf: TileTensor[indices_type, address_space=indices_buf.address_space, linear_idx_type=indices_buf.linear_idx_type, element_size=indices_buf.element_size]) -> IndexList[output_rank]
Compute the output shape of a index_tensor 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 (
TileTensor[input_type, address_space=input_buf.address_space, linear_idx_type=input_buf.linear_idx_type, element_size=input_buf.element_size]): The input tensor. - βindices_buf (
TileTensor[indices_type, address_space=indices_buf.address_space, linear_idx_type=indices_buf.linear_idx_type, element_size=indices_buf.element_size]): The indices tensor.
Returns:
IndexList[output_rank]: The output shape.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!