MLIR  19.0.0git
Public Member Functions | Static Public Member Functions | List of all members
mlir::sparse_tensor::IterationGraphSorter Class Reference

#include "Dialect/SparseTensor/Transforms/Utils/IterationGraphSorter.h"

Public Member Functions

AffineMap sort (SortMask mask, Value ignored=nullptr)
 Returns a permutation that represents the scheduled loop order. More...
 
unsigned getNumLoops () const
 Returns the number of loops in the iteration graph. More...
 

Static Public Member Functions

static IterationGraphSorter fromGenericOp (linalg::GenericOp genericOp)
 Factory method that construct an iteration graph sorter for the given linalg.generic operation. More...
 

Detailed Description

Definition at line 42 of file IterationGraphSorter.h.

Member Function Documentation

◆ fromGenericOp()

IterationGraphSorter IterationGraphSorter::fromGenericOp ( linalg::GenericOp  genericOp)
static

Factory method that construct an iteration graph sorter for the given linalg.generic operation.

Definition at line 127 of file IterationGraphSorter.cpp.

References mlir::sparse_tensor::hasAnyNonIdentityOperandsOrResults(), and mlir::sparse_tensor::hasAnySparseOperandOrResult().

◆ getNumLoops()

unsigned mlir::sparse_tensor::IterationGraphSorter::getNumLoops ( ) const
inline

Returns the number of loops in the iteration graph.

Definition at line 54 of file IterationGraphSorter.h.

◆ sort()

AffineMap IterationGraphSorter::sort ( SortMask  mask,
Value  ignored = nullptr 
)

Returns a permutation that represents the scheduled loop order.

Note that the returned AffineMap could be null if the kernel cannot be scheduled due to cyclic iteration graph.

Definition at line 167 of file IterationGraphSorter.cpp.

References mlir::sparse_tensor::getSparseTensorEncoding(), mlir::Value::getType(), includesDenseInput(), and includesDenseOutput().


The documentation for this class was generated from the following files: