tvm_tirx.sym.inverse_affine_iter_map

tvm_tirx.sym.inverse_affine_iter_map#

tvm_tirx.sym.inverse_affine_iter_map(iter_map, outputs)#

Apply the inverse of the affine transformation to the outputs. Similar to the back-propagation, starting from the outputs, it visits the DAG of the expressions in reverse topology order and applies the inverse of the affine transformation until it reaches the input. The affine iter map is required to be bijective.

For example, iter_map = [l0 // 16, l0 % 16], outputs = [output_0, output_1], the affine transformation specified by iter_map will be applied to outputs and the result will be {l0: ((output_0*16) + output_1)}.

See also detect_iter_map.

Parameters:
  • iter_map (List[IterSumExpr]) – The bijective affine iter map.

  • outputs (List[Expr]) – The outputs of the affine transformation.

Returns:

results (Map[tvm_tirx.ir.Var, Expr]) – The map from the input to the transformed result.