tvm_tirx.sym.detect_iter_map

tvm_tirx.sym.detect_iter_map#

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

Detect if indices can be written as mapped iters from input iters

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 (IterMapResult) – The iter map matching result. The result’s .indices is empty array if no match can be found.