Expand description
Iterator maps: index expressions decomposed into splits of iterators.
The objects python/tvm_tirx/sym/iter_affine_map.py defines. An IterMark is an iterator
source with its extent; an IterSplitExpr is (source // lower_factor) % extent * scale;
an IterSumExpr is a sum of splits plus base_. An IterMapResult holds the detected
indices, the errors and the padding_predicate. The functions of iter_affine_map.py,
which detect, simplify, divide and invert iterator maps, are here too.
Structs§
- Opaque: no metadata of its own: total_size is unknown. Fields are read through the C ABI getters.
- Complete: reflected fields fill [24, 48) exactly.
- Complete: reflected fields fill [24, 40) exactly.
- Opaque: parent ‘sym.IterMapExpr’ is opaque (layout-unknown). Fields are read through the C ABI getters.
- Opaque: parent ‘sym.IterMapExpr’ is opaque (layout-unknown). Fields are read through the C ABI getters.
Enums§
- How strictly an iterator map is checked:
sym::IterMapLevel.
Functions§
- Detect
indicesas iterator maps of the iteratorsinput_itersunderpredicate; theindicesof the result are empty when they are not (sym.DetectIterMap). - The inputs of the bijective iterator map
iter_mapas expressions of itsoutputs(sym.InverseAffineIterMap). - Simplify
indicesthrough iterator map detection; they are returned unchanged when they are not iterator maps (sym.IterMapSimplify). - The plain expression of the iterator map
expr(sym.NormalizeIterMapToExpr). indexas a sum of splits of the iteratorsinput_iters, with what is not detected in itsbase(sym.NormalizeToIterSum).- Divide each binding into an outer map of the iterators not in
sub_itersand an inner map of those in it: one[outer, inner]pair of marks per binding, then a pair whoseextents are the outer and inner predicates, or empty when the bindings cannot be divided (sym.SubspaceDivide).