Shortcuts

SemiSparseLayout

class torchao.dtypes.SemiSparseLayout[source]

SemiSparseLayout is a layout class for handling semi-structured sparse matrices in affine quantized tensors. This layout is specifically designed to work with the 2:4 sparsity pattern, where two out of every four elements are pruned to zero. This class provides methods for preprocessing input tensors to conform to this sparsity pattern.

Docs

Access comprehensive developer documentation for PyTorch

View Docs

Tutorials

Get in-depth tutorials for beginners and advanced developers

View Tutorials

Resources

Find development resources and get your questions answered

View Resources