Layout¶
- class torchao.dtypes.Layout[source]¶
The Layout class serves as a base class for defining different data layouts for tensors. It provides methods for pre-processing and post-processing tensors, as well as static pre-processing with additional parameters like scale, zero_point, and block_size.
The Layout class is designed to be extended by other layout classes that define specific data representations and behaviors for tensors. It is used in conjunction with TensorImpl classes to represent custom data layouts and how tensors interact with different operators.