tvm_tirx.sym.iter_map_simplify

tvm_tirx.sym.iter_map_simplify#

tvm_tirx.sym.iter_map_simplify(indices, input_iters, predicate=True, check_level=IterMapLevel.Surjective, analyzer=None, simplify_trivial_iterators=True)#

Simplify the indices using iter map detection.

Parameters:
  • indices (List[Expr]) – The input indices

  • input_iters (Map[tvm_tirx.ir.Var, Range]) – The domain of each input iterators.

  • predicate (Expr) – The predicate constraints on the input iterators

  • check_level (Union[str, IterMapLevel]) – Checking level of iteration mapping

  • simplify_trivial_iterators (bool) – If true, iterators with extent of 1 will be replaced with a constant value.

  • analyzer (Optional[tvm_tirx.sym.Analyzer]) – The analyzer to use. When provided, its accumulated bindings and constraints are reused; otherwise a fresh analyzer is created.

Returns:

results (List[Expr]) – The simplified indices. The input indices are returned unchanged if no match can be found.