tvm
Classes | Namespaces | Functions
iter_affine_map.h File Reference

Iterator quasi-affine mapping patterns. More...

#include <tvm/arith/analyzer.h>
#include <tvm/ir/expr.h>
#include <tvm/tir/var.h>
Include dependency graph for iter_affine_map.h:

Go to the source code of this file.

Classes

class  tvm::arith::IterMapExprNode
 Base class of all iter map expressions. More...
 
class  tvm::arith::IterMapExpr
 Managed reference to IterMapExprNode. More...
 
class  tvm::arith::IterMarkNode
 Mark the source as an iterator in [0, extent). More...
 
class  tvm::arith::IterMark
 Managed reference to IterMarkExprNode. More...
 
class  tvm::arith::IterSplitExprNode
 Split of an iterator. More...
 
class  tvm::arith::IterSplitExpr
 Managed reference to IterSplitExprNode. More...
 
class  tvm::arith::IterSumExprNode
 Fuse multiple iterators by summing them with scaling. More...
 
class  tvm::arith::IterSumExpr
 Managed reference to IterSumExprNode. More...
 

Namespaces

 tvm
 Performance counters for profiling via the PAPI library.
 
 tvm::arith
 namespace of arithmetic analysis.
 

Functions

Array< IterSumExpr > tvm::arith::DetectIterMap (const Array< PrimExpr > &indices, const Map< Var, Range > &input_iters, const PrimExpr &predicate, bool require_bijective, arith::Analyzer *analyzer)
 Detect if indices can be written as [y_0 + c_0, y_1 + c_1, ..., y_n + c_n]. More...
 
Array< PrimExpr > tvm::arith::IterMapSimplify (const Array< PrimExpr > &indices, const Map< Var, Range > &input_iters, const PrimExpr &input_pred, bool require_bijective)
 Use IterVarMap detector to rewrite and simplify the indices. More...
 
Map< Var, PrimExpr > tvm::arith::InverseAffineIterMap (const Array< IterSumExpr > &iter_map, const Array< PrimExpr > outputs)
 Apply the inverse of the affine transformation to the outputs. More...
 
Array< Array< IterMark > > tvm::arith::SubspaceDivide (const Array< PrimExpr > &bindings, const Map< Var, Range > &input_iters, const Array< Var > &sub_iters, const PrimExpr &predicate, bool require_bijective, arith::Analyzer *analyzer)
 Detect if bindings can be written as [a_0*e_0 + b_0 + c_0, a_1*e_1 + b_1, ..., a_n*e_n + b_n]. More...
 

Detailed Description

Iterator quasi-affine mapping patterns.

This file defines a collection of mapping patterns maps a collection of independent iterators to another collection of independent iterators.

There are two main kinds of mapping patterns:

We use the name "(quasi)affine" to be consistent with the terminology used in the polyhedral compilation. Notably, fuse is an affine transformation, while split corresponds to additional floordiv/mod operations that can appear in quasi-affine transformations.