tvm_tirx.sym.normalize_to_iter_sum#
- tvm_tirx.sym.normalize_to_iter_sum(index, input_iters, analyzer=None)#
Normalize expr to iter sum.
The normalized result ensures that each scale is in the form of (symbol_prod) * cscale It will also sort in desc order by cscale then len(symbol_prod).
- Parameters:
index (Expr) – The input index
input_iters (Map[tvm_tirx.ir.Var, Range]) – The domain of each input iterators.
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:
iter_sum (IterSumExpr) – The result iter sum
Note
This function does best effort detection, so some undetected part can go into iter_sum.base
This function is useful to decide the stride multiplier and division factor in buffer access patterns.