|
15 | 15 | # specific language governing permissions and limitations |
16 | 16 | # under the License. |
17 | 17 | """FFI APIs for tvm.arith""" |
18 | | -import tvm_ffi |
| 18 | +# tvm-ffi-stubgen(begin): import-section |
| 19 | +# fmt: off |
| 20 | +# isort: off |
| 21 | +from __future__ import annotations |
| 22 | +from tvm_ffi import init_ffi_api as _FFI_INIT_FUNC |
| 23 | +from typing import TYPE_CHECKING |
| 24 | +if TYPE_CHECKING: |
| 25 | + from arith import ConstIntBound, IntConstraints, IntConstraintsTransform, IntGroupBounds, IntervalSet, IterMark, IterSplitExpr, IterSumExpr, ModularSet |
| 26 | + from collections.abc import Mapping, Sequence |
| 27 | + from ir import IntImm, IntSet, PrimExpr, Range |
| 28 | + from tir import Buffer, PrimFunc, Stmt, Var |
| 29 | + from tvm_ffi import Object |
| 30 | + from typing import Any |
| 31 | +# isort: on |
| 32 | +# fmt: on |
| 33 | +# tvm-ffi-stubgen(end) |
19 | 34 |
|
20 | 35 |
|
21 | | -tvm_ffi.init_ffi_api("arith", __name__) |
| 36 | + |
| 37 | +# tvm-ffi-stubgen(begin): global/arith |
| 38 | +# fmt: off |
| 39 | +_FFI_INIT_FUNC("arith", __name__) |
| 40 | +if TYPE_CHECKING: |
| 41 | + def ConstIntBound(_0: int, _1: int, /) -> ConstIntBound: ... |
| 42 | + def CreateAnalyzer(*args: Any) -> Any: ... |
| 43 | + def DeduceBound(_0: PrimExpr, _1: PrimExpr, _2: Mapping[Var, IntSet], _3: Mapping[Var, IntSet], /) -> IntSet: ... |
| 44 | + def DetectClipBound(_0: PrimExpr, _1: Sequence[Var], /) -> Sequence[PrimExpr]: ... |
| 45 | + def DetectCommonSubExpr(_0: PrimExpr, _1: int, /) -> Mapping[PrimExpr, IntImm]: ... |
| 46 | + def DetectIterMap(_0: Sequence[PrimExpr], _1: Mapping[Var, Range], _2: PrimExpr, _3: int, _4: bool, /) -> Object: ... |
| 47 | + def DetectLinearEquation(_0: PrimExpr, _1: Sequence[Var], /) -> Sequence[PrimExpr]: ... |
| 48 | + def DomainTouched(_0: Stmt, _1: Buffer, _2: bool, _3: bool, /) -> Sequence[Range]: ... |
| 49 | + def DomainTouchedAccessMap(_0: PrimFunc, /) -> Mapping[Buffer, Sequence[Object]]: ... |
| 50 | + def EstimateRegionLowerBound(_0: Sequence[Range], _1: Mapping[Var, Range], _2: PrimExpr, /) -> Sequence[IntSet] | None: ... |
| 51 | + def EstimateRegionStrictBound(_0: Sequence[Range], _1: Mapping[Var, Range], _2: PrimExpr, /) -> Sequence[IntSet] | None: ... |
| 52 | + def EstimateRegionUpperBound(_0: Sequence[Range], _1: Mapping[Var, Range], _2: PrimExpr, /) -> Sequence[IntSet] | None: ... |
| 53 | + def IntConstraints(_0: Sequence[Var], _1: Mapping[Var, Range], _2: Sequence[PrimExpr], /) -> IntConstraints: ... |
| 54 | + def IntConstraintsTransform(_0: IntConstraints, _1: IntConstraints, _2: Mapping[Var, PrimExpr], _3: Mapping[Var, PrimExpr], /) -> IntConstraintsTransform: ... |
| 55 | + def IntGroupBounds(_0: PrimExpr, _1: Sequence[PrimExpr], _2: Sequence[PrimExpr], _3: Sequence[PrimExpr], /) -> IntGroupBounds: ... |
| 56 | + def IntGroupBounds_FindBestRange(*args: Any) -> Any: ... |
| 57 | + def IntGroupBounds_from_range(_0: Range, /) -> IntGroupBounds: ... |
| 58 | + def IntSetIsEverything(_0: IntSet, /) -> bool: ... |
| 59 | + def IntSetIsNothing(_0: IntSet, /) -> bool: ... |
| 60 | + def IntervalSet(_0: PrimExpr, _1: PrimExpr, /) -> IntervalSet: ... |
| 61 | + def IntervalSetGetMax(_0: IntSet, /) -> PrimExpr: ... |
| 62 | + def IntervalSetGetMin(_0: IntSet, /) -> PrimExpr: ... |
| 63 | + def InverseAffineIterMap(_0: Sequence[IterSumExpr], _1: Sequence[PrimExpr], /) -> Mapping[Var, PrimExpr]: ... |
| 64 | + def IterMapSimplify(_0: Sequence[PrimExpr], _1: Mapping[Var, Range], _2: PrimExpr, _3: int, _4: bool, /) -> Sequence[PrimExpr]: ... |
| 65 | + def IterMark(_0: PrimExpr, _1: PrimExpr, /) -> IterMark: ... |
| 66 | + def IterSplitExpr(_0: IterMark, _1: PrimExpr, _2: PrimExpr, _3: PrimExpr, /) -> IterSplitExpr: ... |
| 67 | + def IterSumExpr(_0: Sequence[IterSplitExpr], _1: PrimExpr, /) -> IterSumExpr: ... |
| 68 | + def ModularSet(_0: int, _1: int, /) -> ModularSet: ... |
| 69 | + def NarrowPredicateExpression(_0: PrimExpr, _1: Mapping[Var, Range], /) -> PrimExpr: ... |
| 70 | + def NegInf() -> PrimExpr: ... |
| 71 | + def NormalizeIterMapToExpr(_0: PrimExpr, /) -> PrimExpr: ... |
| 72 | + def NormalizeToIterSum(_0: PrimExpr, _1: Mapping[Var, Range], /) -> IterSumExpr: ... |
| 73 | + def PosInf() -> PrimExpr: ... |
| 74 | + def PresburgerSet(_0: PrimExpr, /) -> IntSet: ... |
| 75 | + def SolveInequalitiesAsCondition(*args: Any) -> Any: ... |
| 76 | + def SolveInequalitiesDeskewRange(*args: Any) -> Any: ... |
| 77 | + def SolveInequalitiesToRange(*args: Any) -> Any: ... |
| 78 | + def SolveLinearEquations(*args: Any) -> Any: ... |
| 79 | + def SubspaceDivide(_0: Sequence[PrimExpr], _1: Mapping[Var, Range], _2: Sequence[Var], _3: PrimExpr, _4: int, _5: bool, /) -> Sequence[Sequence[IterMark]]: ... |
| 80 | + def UnionLowerBound(_0: Sequence[IntSet], /) -> IntSet: ... |
| 81 | + def intset_interval(_0: PrimExpr, _1: PrimExpr, /) -> IntSet: ... |
| 82 | + def intset_single_point(_0: PrimExpr, /) -> IntSet: ... |
| 83 | + def intset_vector(_0: PrimExpr, /) -> IntSet: ... |
| 84 | +# fmt: on |
| 85 | +# tvm-ffi-stubgen(end) |
0 commit comments