Mojo function
slice_as_view
slice_as_view[dtype: DType, start_type: DType, end_type: DType, step_type: DType](tensor: TileTensor[dtype, tensor.LayoutType, tensor.origin, address_space=tensor.address_space, linear_idx_type=tensor.linear_idx_type, element_size=tensor.element_size], starts: TileTensor[start_type, starts.LayoutType, starts.origin, address_space=starts.address_space, linear_idx_type=starts.linear_idx_type, element_size=starts.element_size], ends: TileTensor[end_type, ends.LayoutType, ends.origin, address_space=ends.address_space, linear_idx_type=ends.linear_idx_type, element_size=ends.element_size], steps: TileTensor[step_type, steps.LayoutType, steps.origin, address_space=steps.address_space, linear_idx_type=steps.linear_idx_type, element_size=steps.element_size]) -> TileTensor[dtype, Layout[#kgen.variadic.tabulate(TileTensor[dtype, tensor.LayoutType, tensor.origin, address_space=tensor.address_space, linear_idx_type=tensor.linear_idx_type, element_size=tensor.element_size].rank, [idx: __mlir_type.index] RuntimeInt[DType.int64]), #kgen.variadic.tabulate(TileTensor[dtype, tensor.LayoutType, tensor.origin, address_space=tensor.address_space, linear_idx_type=tensor.linear_idx_type, element_size=tensor.element_size].rank, [idx: __mlir_type.index] RuntimeInt[DType.int64])], tensor.origin, address_space=tensor.address_space]
Returns:
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!