Function tvm::sym::InverseAffineIterMap

Function tvm::sym::InverseAffineIterMap#

Function Documentation#

ffi::Map<Var, PrimExpr> tvm::sym::InverseAffineIterMap(const ffi::Array<IterSumExpr> &iter_map, const ffi::Array<PrimExpr> 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)}.

The range of outputs should be the same as the output range of the affine transmation.

See also

DetectIterMap

Parameters:
  • iter_map – The bijective affine iter map.

  • outputs – The outputs of the affine transformation.

Returns:

The map from the input to the transformed result.