Skip to main content

Mojo function

slice_as_view

slice_as_view[dtype: DType, start_type: DType, end_type: DType, step_type: DType](tensor: TileTensor[dtype, LayoutType, origin, address_space=address_space, linear_idx_type=linear_idx_type, element_shape_types=element_shape_types], starts: TileTensor[start_type, LayoutType, origin, address_space=address_space, linear_idx_type=linear_idx_type, element_shape_types=element_shape_types], ends: TileTensor[end_type, LayoutType, origin, address_space=address_space, linear_idx_type=linear_idx_type, element_shape_types=element_shape_types], steps: TileTensor[step_type, LayoutType, origin, address_space=address_space, linear_idx_type=linear_idx_type, element_shape_types=element_shape_types]) -> TileTensor[dtype, Layout[#kgen.variadic.splat<:trait<_layout::__coord::_CoordLike> _layout::__coord::_RuntimeInt<:!lit.struct<_std::_builtin::_dtype::_DType> {:dtype si64}>, #lit.struct.extract<:!lit.struct<_std::_builtin::_int::_Int> sugar_member_alias(!lit.struct<_layout::__tile_tensor::_TileTensor<:!lit.struct<_std::_builtin::_bool::_Bool> *"tensor.mut", :!lit.struct<_std::_builtin::_dtype::_DType> dtype, :trait<_layout::__layout::_TensorLayout> *"tensor.LayoutType1", :!lit.struct<_std::_builtin::_type_aliases::_Origin<:!lit.struct<_std::_builtin::_bool::_Bool> *"tensor.mut">> *"tensor.origin2", :!lit.struct<_std::_memory::_pointer::_AddressSpace> *"tensor.address_space3", :!lit.struct<_std::_builtin::_dtype::_DType> *"tensor.linear_idx_type4", :variadic<trait<_layout::__coord::_CoordLike>> *"tensor.element_shape_types5">>, "rank", sugar_member_alias(!kgen.param<:trait<_layout::__layout::_TensorLayout> *"tensor.LayoutType1">, "rank", #kgen.get_witness<:trait<_layout::__layout::_TensorLayout> *"tensor.LayoutType1", "layout::_layout::TensorLayout", "rank">)), "_mlir_value"> : index>, #kgen.variadic.splat<:trait<_layout::__coord::_CoordLike> _layout::__coord::_RuntimeInt<:!lit.struct<_std::_builtin::_dtype::_DType> {:dtype si64}>, #lit.struct.extract<:!lit.struct<_std::_builtin::_int::_Int> sugar_member_alias(!lit.struct<_layout::__tile_tensor::_TileTensor<:!lit.struct<_std::_builtin::_bool::_Bool> *"tensor.mut", :!lit.struct<_std::_builtin::_dtype::_DType> dtype, :trait<_layout::__layout::_TensorLayout> *"tensor.LayoutType1", :!lit.struct<_std::_builtin::_type_aliases::_Origin<:!lit.struct<_std::_builtin::_bool::_Bool> *"tensor.mut">> *"tensor.origin2", :!lit.struct<_std::_memory::_pointer::_AddressSpace> *"tensor.address_space3", :!lit.struct<_std::_builtin::_dtype::_DType> *"tensor.linear_idx_type4", :variadic<trait<_layout::__coord::_CoordLike>> *"tensor.element_shape_types5">>, "rank", sugar_member_alias(!kgen.param<:trait<_layout::__layout::_TensorLayout> *"tensor.LayoutType1">, "rank", #kgen.get_witness<:trait<_layout::__layout::_TensorLayout> *"tensor.LayoutType1", "layout::_layout::TensorLayout", "rank">)), "_mlir_value"> : index>], origin, address_space=address_space]

Returns:

TileTensor

Was this page helpful?