13#ifndef MLIR_DIALECT_SPARSETENSOR_TRANSFORMS_UTILS_ITERATIONGRAPHSORTER_H_
14#define MLIR_DIALECT_SPARSETENSOR_TRANSFORMS_UTILS_ITERATIONGRAPHSORTER_H_
24enum class IteratorType : uint32_t;
30namespace sparse_tensor {
43class IterationGraphSorter {
48 static IterationGraphSorter
58 unsigned getNumLoops()
const {
return loop2OutLvl.getNumDims(); }
89 std::vector<std::vector<bool>> itGraph;
92 std::vector<unsigned> inDegree;
A multi-dimensional affine map Affine map's are immutable like Type's, and they are uniqued.
This class represents an instance of an SSA value in the MLIR system, representing a computable value...
static IterationGraphSorter fromGenericOp(linalg::GenericOp genericOp, sparse_tensor::LoopOrderingStrategy strategy)
Factory method that constructs an iteration graph sorter for the given linalg.generic operation with ...
unsigned getNumLoops() const
Returns the number of loops in the iteration graph.
AffineMap sort(SortMask mask, Value ignored=nullptr)
Returns a permutation that represents the scheduled loop order.
LoopOrderingStrategy
Defines a strategy for loop ordering during sparse code generation.
SortMask
Iteration graph sorting mask,.
Include the generated interface declarations.