Function tvm::sym::DeduceBound

Function tvm::sym::DeduceBound#

Function Documentation#

IntSet tvm::sym::DeduceBound(PrimExpr v, PrimExpr cond, const ffi::Map<Var, IntSet> &hint_map, const ffi::Map<Var, IntSet> &relax_map)#

Deduce the bound of the target variable in an expression, given the domain of each variable. Return IntSet::Nothing() to represent failure.

Note

The returned set may be smaller than set that contains all possible values of v that satisfies the bound.

Parameters:
  • v – The target variable to be deduced.

  • cond – The conditional expression.

  • hint_map – The domain of variable, used to help deduce.

  • relax_map – The domain of each variable, used to relax the domain, The deduce bound must imply e for all value in relax_map

Returns:

An integer set that always satisfies the condition.