__init__.py 2.23 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#   http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
# pylint: disable=unused-import, redefined-builtin
"""Namespace for Tensor-level IR"""
from tvm.ir import PrimExpr
20 21
from tvm.runtime import const

22 23 24 25 26
from .buffer import Buffer, decl_buffer
from .data_layout import Layout, BijectiveLayout, bijective_layout, layout
from .expr import Var, SizeVar, Reduce, FloatImm, IntImm, StringImm, Cast
from .expr import Add, Sub, Mul, Div, Mod, FloorDiv, FloorMod
from .expr import Min, Max, EQ, NE, LT, LE, GT, GE, And, Or, Not
27
from .expr import Select, BufferLoad, Load, Ramp, Broadcast, Shuffle, Call, Let
28
from .expr import IterVar, Any
29 30

from .stmt import Stmt, LetStmt, AssertStmt, ProducerConsumer, For
31
from .stmt import BufferStore, Store, Provide, Allocate, AttrStmt, Free, Realize, SeqStmt
32
from .stmt import IfThenElse, Evaluate, Prefetch, stmt_seq, stmt_list
33

34 35
from .function import PrimFunc

36
from .op import call_packed, call_pure_intrin, call_intrin, call_pure_extern, call_extern
37
from .op import call_llvm_intrin, all, any, min_value, max_value, trace
38 39 40
from .op import exp, exp2, exp10, log, log2, log10
from .op import cos, sin, cosh, sinh, tan, tanh, atan
from .op import erf, sigmoid, sqrt, rsqrt, floor, ceil
41 42
from .op import trunc, abs, round, nearbyint, power, popcount, fmod, if_then_else
from .op import isnan, isfinite, isinf
43
from .op import div, indexdiv, indexmod, truncdiv, truncmod, floordiv, floormod
44
from .op import comm_reducer, min, max, sum
45 46 47

from . import ir_builder
from . import ir_pass
48
from . import transform
49
from . import analysis