yzhliu commented on a change in pull request #5618:
URL: https://github.com/apache/incubator-tvm/pull/5618#discussion_r441316107
##########
File path: python/tvm/arith/int_solver.py
##########
@@ -97,3 +143,33 @@ def solve_linear_equations(equations, variables=None,
ranges=None):
if isinstance(equations, IntConstraints):
return _ffi_api.SolveLinearEquations(equations)
return _ffi_api.SolveLinearEquations(variables, ranges, equations)
+
+
+def solve_linear_inequalities(equations, variables=None, ranges=None,
deskew_range=False):
+ """Solve linear inequalities.
+
+ Parameters
+ ----------
+ equations : List[tvm.ir.PrimExpr] or IntConstraints
+ The inequalities of the variables
+ variables : Optional[List[tvm.tir.Var]]
+ The variables in the system.
+ ranges : Optional[Map[tvm.tir.Var, tvm.ir.Range]]
+ The ranges of the variables.
+ deskew_range: Optional[bool]
+ Whether deskew the result ranges to be started from zero.
+ Default false.
+
+ Returns
+ -------
+ ret_ranges: IntConstraints or IntConstraintsTransform
Review comment:
do you mean adding another function for `deskew_range=False`, or making
`deskew_range=False` also return IntConstraintsTransform?
##########
File path: python/tvm/arith/int_solver.py
##########
@@ -20,6 +20,52 @@
from . import _ffi_api
+@tvm._ffi.register_object("arith.IntGrpBounds")
+class IntGrpBounds(Object):
+ """Represent integer grouped bounds which are classified into
+ lower bounds (include), upper bounds (include) and equalities.
+
+ Parameters
+ ----------
+ coef : tvm.ir.PrimExpr
+ The coefficient. Must be integer.
Review comment:
yes. change to "integer type"
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]