Login
📚 The Mojo Manual
Chapters ▾

8.1 Introduction to TileTensor

Mojo's layout package provides a number of APIs for working with dense multidimensional arrays, which simplify writing algorithms for handling linear algebra.

This section discusses the TileTensor abstraction and its related types:

The layout package also includes the older LayoutTensor type, and its associated IntTuple-based layout type, layout.Layout. TileTensor is essentially a new version of LayoutTensor that addresses several of the shortcomings of that type. Most of the concepts are the same for both the old and new types. However, TileTensor doesn't yet implement all the features supported by LayoutTensor. Here are some guidelines for when to use each type:

You can convert a TileTensor into a LayoutTensor, so you can use both types if necessary. Likewise, you can easily convert a Coord-based layout into an IntTuple-based layout.

For more information on LayoutTensor, see the pages on IntTuple-based layouts and LayoutTensor.