tvm
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Enumerations | Functions
tvm Namespace Reference

An object that builds and maintains block scope and StmtSref mapping for Dependence analysis. More...

Namespaces

namespace  attr
 Generic attribute names that can be attached to any function.
 
namespace  backend
 
namespace  codegen
 namespace for target translation and codegen.
 
namespace  detail
 
namespace  ffi
 
namespace  op_attr
 
namespace  prim
 
namespace  relax
 
namespace  runtime
 
namespace  s_tir
 
namespace  script
 
namespace  sig
 
namespace  support
 
namespace  sym
 namespace of symbolic analysis.
 
namespace  te
 Tensor expression language DSL.
 
namespace  tirx
 
namespace  topi
 
namespace  transform
 
namespace  type_attr
 

Classes

class  AnyType
 Managed reference to AnyTypeObj. More...
 
class  AnyTypeObj
 The top type, which admits any value. More...
 
class  ArgumentInfo
 Managed reference to an argument descriptor. More...
 
class  ArgumentInfoObj
 An operator argument's name and documentation. More...
 
class  AssertStmt
 Managed reference to AssertStmtObj. More...
 
class  AssertStmtObj
 Assert condition, if an error occurs, return the error message. More...
 
class  Attrs
 Managed reference to AttrsObj. More...
 
class  AttrsObj
 Base class of all attribute class. More...
 
class  BaseFunc
 Managed reference to BaseFuncObj. More...
 
class  BaseFuncObj
 Base node of all functions. More...
 
class  Bind
 Managed reference to BindObj. More...
 
class  BindObj
 Bind a variable to a value in the enclosing scope. More...
 
class  Break
 Managed reference to BreakObj. More...
 
class  BreakObj
 A Break in control flow. More...
 
class  Call
 Managed reference to CallObj. More...
 
class  CallObj
 Call corresponds to callable invocation. More...
 
class  CallSiteLoc
 Explicit inline callee/caller provenance. More...
 
class  CallSiteLocObj
 The location of a callee together with its caller's provenance. More...
 
class  ConfigSchema
 Dynamic config schema for map-like options. More...
 
class  Constant
 Managed reference to a literal constant. More...
 
class  ConstantObj
 Base node for literal constants. More...
 
class  Continue
 Managed reference to ContinueObj. More...
 
class  ContinueObj
 A Continue in control flow. More...
 
class  DataTypeImm
 Managed reference to a data type literal. More...
 
class  DataTypeImmObj
 A data type literal with AnyType as its expression type. More...
 
class  DictAttrs
 Managed reference to DictAttrsObj. More...
 
class  DictAttrsObj
 Specialized attribute type that is backed by a map. The DictAttrsObj implements the Attrs behavior, its fields are directly accessible via object.field_name like other normal nodes. More...
 
class  EnvFunc
 Managed reference to EnvFuncObj. More...
 
class  EnvFuncObj
 A serializable function backed by TVM's global environment. More...
 
class  Evaluate
 Managed reference to EvaluateObj. More...
 
class  EvaluateObj
 Evaluates an expression. This is mostly used for putting a Call node into Stmt. More...
 
class  Expr
 Managed reference to ExprObj. More...
 
class  ExprFunctor
 Type-dispatched expression functor with a caller-selected signature. More...
 
class  ExprFunctor< R(const Expr &, Args...)>
 
class  ExprMutator
 Structural Expr mutator with native overrides for core expressions and structural fallback for other objects. More...
 
class  ExprObj
 Base type of all the expressions. More...
 
class  ExprVisitor
 Structural Expr visitor with native overrides for core expressions. More...
 
class  FloatImm
 Managed reference class to FloatImmObj. More...
 
class  FloatImmObj
 Constant floating point literals in the program. More...
 
class  For
 Managed reference to ForObj. More...
 
class  ForObj
 A for loop, with possible type annotations. More...
 
class  FuncType
 Managed reference to FuncTypeObj. More...
 
class  FuncTypeObj
 Function type. More...
 
class  GenericConst
 Managed reference to a generic constant. More...
 
class  GenericConstObj
 A constant whose payload is separate from its expression type. More...
 
class  GlobalInfo
 Managed reference to GlobalInfoObj. More...
 
class  GlobalInfoObj
 GlobalInfo are globally static object that are referred by the IR itself. Base node for all global info that can appear in the IR. More...
 
class  GlobalVar
 Managed reference to GlobalVarObj. More...
 
class  GlobalVarObj
 Global variable that lives in the top-level module. More...
 
class  If
 Managed reference to IfObj. More...
 
class  IfObj
 If statement. More...
 
class  IntExpr
 View over a scalar signed or unsigned integer expression of any bit width. More...
 
class  IntImm
 Managed reference class to IntImmObj. More...
 
class  IntImmObj
 Constant integer literals in the program. More...
 
class  IRModule
 Managed reference class to IRModuleObj. More...
 
class  IRModuleObj
 IRModule that holds functions and type definitions. More...
 
class  LambdaExpr
 Managed reference to a typed staging lambda. More...
 
class  LambdaExprObj
 A typed staging expression representing a lambda computation. More...
 
class  Location
 Non-nullable source-location metadata. More...
 
class  LocationObj
 Base class for immutable source-location metadata. More...
 
class  MissingType
 Managed reference to the MissingTypeObj singleton. More...
 
class  MissingTypeObj
 Type information that has not been supplied or computed. More...
 
class  NoneType
 Managed reference to NoneTypeObj. More...
 
class  NoneTypeObj
 The type whose only value is None. More...
 
class  ObjectFunctor
 A dynamically dispatched functor on the type of the first argument. More...
 
class  ObjectFunctor< R(NodeArg, Args...)>
 
class  ObjectMutator
 Native mutation with exact dispatch and structural fallback. More...
 
class  ObjectVisitor
 Native visiting with exact dispatch and structural fallback. More...
 
class  Op
 Reference-counted handle to a canonical named operator. More...
 
class  OpaqueExpr
 Managed reference to OpaqueExprObj. More...
 
class  OpaqueExprObj
 Base node for opaque construction-time expressions. More...
 
class  OpaqueType
 Managed reference to OpaqueTypeObj. More...
 
class  OpaqueTypeObj
 Type marker for opaque construction-time expressions. More...
 
class  OpAttrMap
 Typed live view of an Op attribute column. More...
 
class  OpDef
 Noncopyable temporary builder for a canonical Op; see Op for the example. More...
 
class  OpObj
 Metadata for a canonical primitive operator invoked through Call. More...
 
class  Pattern
 Base class of all the patterns. More...
 
class  PBinaryExpr
 Pattern binary expression. More...
 
class  PBitwiseNotExpr
 Pattern bitwise not expression. More...
 
class  PBroadcastExpr
 Pattern broadcast expression. More...
 
class  PCallExpr
 Pattern CallExpr expression. More...
 
class  PCastExpr
 Pattern cast expression. More...
 
class  PConst
 Constant Pattern variable container. More...
 
class  PConstWithTypeLike
 
class  PEqualChecker
 Default deep equality checker. More...
 
class  PEqualChecker< FloatImm >
 
class  PEqualChecker< IntImm >
 
class  PEqualChecker< PrimExpr >
 
class  PEqualChecker< Var >
 
struct  PIfThenElseOp
 
class  PMatchesOneOf
 
class  PNotExpr
 Pattern not expression. More...
 
class  PRampExpr
 Pattern ramp expression. More...
 
class  PrimExpr
 Typed reference/view over any Expr whose ExprObj::ty is PrimType. More...
 
class  PrimType
 
class  PrimTypeObj
 Primitive data types used in the low-level IR. More...
 
class  PrimVar
 Checked scalar view over a VarObj. More...
 
class  PrinterConfig
 
class  PrinterConfigObj
 
class  PSelectExpr
 Pattern select expression. More...
 
class  PtrType
 
class  PtrTypeObj
 Low-level raw pointer type. More...
 
class  PVar
 Pattern variable container. More...
 
class  PVarWithCheck
 Wrapper for pattern variable container with extra match logic. More...
 
class  PVarWithDataType
 Pattern variable container with expr type check. More...
 
class  PVecDataType
 Pattern variable container for data type with lanes. More...
 
class  Range
 Range container
More...
 
class  RangeObj
 range over one dimension More...
 
class  RegionStmt
 Managed reference to RegionStmtObj. More...
 
class  RegionStmtObj
 A single-body statement whose semantics are defined by an operator. Operands are evaluated in the enclosing scope. Body parameters are definitions at body entry; result variables are definitions following the region. More...
 
class  Return
 Managed reference to ReturnObj. More...
 
class  ReturnObj
 A return from the current function. More...
 
class  ScopeStack
 A scope stack for maintaining hierarchical state during IR visiting. More...
 
class  SeqStmt
 Sequence statement. More...
 
class  SeqStmtObj
 The container of seq statement. Represent a sequence of statements. More...
 
class  SourceLoc
 A concrete source range. More...
 
class  SourceLocObj
 A range in one source, retaining frontend coordinate conventions. More...
 
class  SourceName
 The source name of a file loc. More...
 
class  SourceNameObj
 The name of a source fragment. More...
 
class  StagingExpr
 Managed reference to a staging expression. More...
 
class  StagingExprObj
 Base node for traversable expressions eliminated during compilation. More...
 
class  Stmt
 Container of all statements. More...
 
class  StmtObj
 Base node of all statements. More...
 
class  StringImm
 Managed reference to a string literal. More...
 
class  StringImmObj
 A string literal with shared semantic StringType. More...
 
class  StringType
 Managed reference to StringTypeObj. More...
 
class  StringTypeObj
 Semantic string type; its physical representation is context dependent. More...
 
class  Target
 Managed reference class to TargetObj. More...
 
class  TargetKind
 Managed reference class to TargetKindObj. More...
 
class  TargetKindDef
 Temporary fluent builder for registering a target kind. More...
 
class  TargetKindObj
 Target kind, specifies the kind of the target. More...
 
class  TargetKindRegistry
 Process-wide registry of canonical target kinds, keyed by name. More...
 
class  TargetObj
 Compilation target. More...
 
class  TargetTagRegistry
 Registry of target configurations keyed by tag name. More...
 
class  TensorLoad
 Managed reference to TensorLoadObj. More...
 
class  TensorLoadObj
 Load a value from an indexed expression source. More...
 
class  TensorRegion
 Managed reference to TensorRegionObj. More...
 
class  TensorRegionObj
 A region of an indexed expression source. More...
 
class  TensorRegionType
 Managed reference to TensorRegionTypeObj. More...
 
class  TensorRegionTypeObj
 The type of a multi-dimensional tensor region expression. More...
 
class  TensorStore
 Managed reference to TensorStoreObj. More...
 
class  TensorStoreObj
 Store a primitive value to an indexed destination expression. More...
 
class  Tuple
 Managed reference to TupleObj. More...
 
class  TupleGetItem
 Managed reference to TupleGetItemObj. More...
 
class  TupleGetItemObj
 Get the index-th field out of a tuple. More...
 
class  TupleObj
 Tuple container. More...
 
class  TupleType
 Managed reference to TupleTypeObj. More...
 
class  TupleTypeObj
 The type of tuple values. More...
 
class  Type
 Managed reference to TypeObj. More...
 
class  TypedEnvFunc
 Please refer to TypedEnvFunc<R(Args..)>. More...
 
class  TypedEnvFunc< R(Args...)>
 A typed version of EnvFunc. It is backed by an EnvFuncObj internally. More...
 
class  TypedExpr
 Typed reference/view over an expression whose result type is a specific Type subtype. More...
 
class  TypeObj
 Type is the base type of all types. More...
 
class  UniqueNameSupply
 Managed reference class to UniqueNameSupplyObj. More...
 
class  UniqueNameSupplyObj
 UniqueNameSupply can be used to generate unique names. More...
 
class  UnknownLoc
 Reference to the shared immutable unknown location. More...
 
class  UnknownLocObj
 No source-location information is available. More...
 
class  Var
 Managed reference to VarObj. More...
 
class  VarObj
 A local variable in the IR. More...
 
class  While
 Managed reference to WhileObj. More...
 
class  WhileObj
 A While loop. More...
 
class  With
 RAII wrapper function to enter and exit a context object similar to python's with syntax. More...
 
class  WithGroup
 A group of RAII contexts managed together. More...
 

Typedefs

using SubscriptSlice = ffi::Array< ffi::Variant< ffi::Tuple< ffi::Optional< PrimExpr >, ffi::Optional< PrimExpr >, ffi::Optional< PrimExpr > >, PrimExpr > >
 Expression subscripts: point indices or (start, stop, step) slices.
 
using FInferType = decltype(op_attr::kInferType)::ValueType
 
using TFixedReturnType = decltype(op_attr::kFixedReturnType)::ValueType
 
using FRegionGetBodyParams = decltype(op_attr::kRegionGetBodyParams)::ValueType
 
using FRegionValidate = decltype(op_attr::kRegionValidate)::ValueType
 
using Device = DLDevice
 
using FTargetCanonicalizer = ffi::TypedFunction< ffi::Map< ffi::String, ffi::Any >(ffi::Map< ffi::String, ffi::Any >)>
 Target canonicalizer applied on instantiation of a given TargetKind.
 

Enumerations

enum class  CallEffectKind : int {
  kExprAnnotation = 0 , kPure = 1 , kReadState = 2 , kUpdateState = 3 ,
  kOpaque = kUpdateState , kSpecialCallArg = 4 , kEmbedInfo = 5 , kControlJump = 6
}
 The effect type of the call. More...
 
enum class  CallingConv : int { kDefault = 0 , kCPackedFunc = 1 , kDeviceKernelLaunch = 2 }
 Possible Calling conventions. More...
 
enum class  LinkageType : int { kInternal = 0 , kExternal = 1 }
 Supported linkage types. More...
 
enum class  ForKind : int { kDefault = 0 , kParallel = 1 , kVectorized = 2 , kUnrolled = 3 }
 The kind of the loop. More...
 

Functions

PrimExpr max (PrimExpr source, ffi::Array< s_tir::IterVar > axis, ffi::Array< PrimExpr > init={}, Location loc=UnknownLoc())
 max of source expression over axis
 
PrimExpr min (PrimExpr source, ffi::Array< s_tir::IterVar > axis, ffi::Array< PrimExpr > init={}, Location loc=UnknownLoc())
 max of source expression over axis
 
ffi::Array< Var > UndefinedVars (ffi::AnyView object, const ffi::Array< Var > &defs={})
 Find variable uses without a preceding definition in well-formed IR.
 
template<typename TFunc >
TFunc WithAttr (TFunc input, const std::string &attr_key, Any attr_value)
 Copy the function or module, but overrides the attribute value key with the value.
 
template<typename TFunc , typename T , typename Value , std::enable_if_t<(std::is_convertible_v< Value &&, T > &&((!std::is_same_v< std::decay_t< Value >, ffi::Any > &&!std::is_same_v< std::decay_t< Value >, ffi::AnyView >)||std::is_same_v< T, ffi::Any >||std::is_same_v< T, ffi::AnyView >)), int > = 0>
TFunc WithAttr (TFunc input, ffi::reflection::AttrKey< T > key, Value &&value)
 Attach a typed value using the existing function or module copy-on-write path.
 
template<typename TFunc >
TFunc WithAttrs (TFunc input, ffi::Map< ffi::String, Any > attrs)
 Copy the function or module, but overrides the attributes with the entries from attrs.
 
template<typename TFunc >
TFunc WithoutAttr (TFunc input, const std::string &attr_key)
 Copy the function or module, but removes the specified attribute.
 
template<typename TFunc , typename T >
TFunc WithoutAttr (TFunc input, ffi::reflection::AttrKey< T > key)
 Remove a typed attribute using the existing copy-on-write path.
 
std::ostream & operator<< (std::ostream &os, CallEffectKind side_effect)
 
TVM_TIRX_DLL CallEffectKind SideEffect (const Expr &expr)
 Analyze the runtime effects of an expression.
 
template<typename... TPattern>
std::enable_if_t<(std::is_base_of_v< Pattern< TPattern >, TPattern > &&... &&true), PMatchesOneOf< TPattern... > > MatchesOneOf (const TPattern &... patterns)
 
TVM_TIRX_DLL PrimExpr operator+ (PrimExpr a, PrimExpr b)
 add operator
 
TVM_TIRX_DLL PrimExpr operator- (PrimExpr a, PrimExpr b)
 subtraction operator
 
TVM_TIRX_DLL PrimExpr operator- (PrimExpr a)
 negation.
 
TVM_TIRX_DLL PrimExpr operator* (PrimExpr a, PrimExpr b)
 multiplication operator
 
TVM_TIRX_DLL PrimExpr operator/ (PrimExpr a, PrimExpr b)
 division operator
 
TVM_TIRX_DLL PrimExpr operator<< (PrimExpr a, PrimExpr b)
 left shift operator
 
TVM_TIRX_DLL PrimExpr operator>> (PrimExpr a, PrimExpr b)
 right shift operator
 
TVM_TIRX_DLL PrimExpr operator> (PrimExpr a, PrimExpr b)
 greater
 
TVM_TIRX_DLL PrimExpr operator>= (PrimExpr a, PrimExpr b)
 greater_equal
 
TVM_TIRX_DLL PrimExpr operator< (PrimExpr a, PrimExpr b)
 less
 
TVM_TIRX_DLL PrimExpr operator<= (PrimExpr a, PrimExpr b)
 less_equal
 
TVM_TIRX_DLL PrimExpr operator== (PrimExpr a, PrimExpr b)
 equal
 
TVM_TIRX_DLL PrimExpr operator!= (PrimExpr a, PrimExpr b)
 not_equal
 
TVM_TIRX_DLL PrimExpr operator&& (PrimExpr a, PrimExpr b)
 and
 
TVM_TIRX_DLL PrimExpr operator|| (PrimExpr a, PrimExpr b)
 or
 
TVM_TIRX_DLL PrimExpr operator! (PrimExpr a)
 not
 
TVM_TIRX_DLL PrimExpr operator& (PrimExpr a, PrimExpr b)
 take bitwise and of two values
 
TVM_TIRX_DLL PrimExpr operator| (PrimExpr a, PrimExpr b)
 take bitwise or of two values
 
TVM_TIRX_DLL PrimExpr operator^ (PrimExpr a, PrimExpr b)
 take bitwise xor of two values
 
TVM_TIRX_DLL PrimExpr operator~ (PrimExpr a)
 take bitwise negation of two values
 
PrimExpr operator+= (PrimExpr &a, PrimExpr b)
 Add an expression in place.
 
PrimExpr operator-= (PrimExpr &a, PrimExpr b)
 Subtract an expression in place.
 
PrimExpr operator*= (PrimExpr &a, PrimExpr b)
 Multiply an expression in place.
 
TVM_TIRX_DLL PrimExpr add (PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
 add operator
 
TVM_TIRX_DLL PrimExpr sub (PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
 subtraction operator
 
TVM_TIRX_DLL PrimExpr neg (PrimExpr a, Location loc=UnknownLoc())
 negation.
 
TVM_TIRX_DLL PrimExpr mul (PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
 multiplication operator
 
TVM_TIRX_DLL PrimExpr left_shift (PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
 left shift operator
 
TVM_TIRX_DLL PrimExpr right_shift (PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
 right shift operator
 
TVM_TIRX_DLL PrimExpr greater (PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
 greater
 
TVM_TIRX_DLL PrimExpr greater_equal (PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
 greater_equal
 
TVM_TIRX_DLL PrimExpr less (PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
 less
 
TVM_TIRX_DLL PrimExpr less_equal (PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
 less_equal
 
TVM_TIRX_DLL PrimExpr equal (PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
 equal
 
TVM_TIRX_DLL PrimExpr not_equal (PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
 not_equal
 
TVM_TIRX_DLL PrimExpr logical_and (PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
 and
 
TVM_TIRX_DLL PrimExpr logical_or (PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
 or
 
TVM_TIRX_DLL PrimExpr logical_not (PrimExpr a, Location loc=UnknownLoc())
 not
 
TVM_TIRX_DLL PrimExpr div (PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
 compute division in C semantics.
 
TVM_TIRX_DLL PrimExpr truncdiv (PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
 compute trunc(a / b)
 
TVM_TIRX_DLL PrimExpr truncmod (PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
 compute the remainder of truncdiv
 
TVM_TIRX_DLL PrimExpr indexdiv (PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
 compute floor(a / b) where a and b are non-negative.
 
TVM_TIRX_DLL PrimExpr shapediv (PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
 compute ceil(a / b) where a and b are non-negative.
 
TVM_TIRX_DLL PrimExpr indexmod (PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
 compute the remainder floor(a / b) where a and b are non-negative.
 
TVM_TIRX_DLL PrimExpr floordiv (PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
 compute floor(a / b)
 
TVM_TIRX_DLL PrimExpr ceildiv (PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
 compute ceil(a / b)
 
TVM_TIRX_DLL PrimExpr floormod (PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
 compute the remainder of floordiv
 
TVM_TIRX_DLL PrimExpr max (PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
 take maximum of two values
 
TVM_TIRX_DLL PrimExpr min (PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
 take minimum of two values
 
TVM_TIRX_DLL PrimExpr bitwise_and (PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
 take bitwise and of two values
 
TVM_TIRX_DLL PrimExpr bitwise_or (PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
 take bitwise or of two values
 
TVM_TIRX_DLL PrimExpr bitwise_xor (PrimExpr a, PrimExpr b, Location loc=UnknownLoc())
 take bitwise xor of two values
 
TVM_TIRX_DLL PrimExpr bitwise_neg (PrimExpr a, Location loc=UnknownLoc())
 take bitwise negation of two values
 
TVM_TIRX_DLL PrimExpr if_then_else (PrimExpr cond, PrimExpr true_value, PrimExpr false_value, Location loc=UnknownLoc())
 Conditional expression.
 
TVM_TIRX_DLL PrimExpr likely (PrimExpr cond, Location loc=UnknownLoc())
 Mark condition as likely.
 
PrimExpr operator+ (const PrimExpr &a, float b)
 
PrimExpr operator+ (float a, const PrimExpr &b)
 
PrimExpr operator+ (int a, const PrimExpr &b)
 
PrimExpr operator+ (const PrimExpr &a, int b)
 
PrimExpr operator+ (const PrimExpr &a, double b)
 
PrimExpr operator- (const PrimExpr &a, float b)
 
PrimExpr operator- (float a, const PrimExpr &b)
 
PrimExpr operator- (int a, const PrimExpr &b)
 
PrimExpr operator- (const PrimExpr &a, int b)
 
PrimExpr operator- (const PrimExpr &a, double b)
 
PrimExpr operator* (const PrimExpr &a, float b)
 
PrimExpr operator* (float a, const PrimExpr &b)
 
PrimExpr operator* (int a, const PrimExpr &b)
 
PrimExpr operator* (const PrimExpr &a, int b)
 
PrimExpr operator* (const PrimExpr &a, double b)
 
PrimExpr operator> (const PrimExpr &a, float b)
 
PrimExpr operator> (float a, const PrimExpr &b)
 
PrimExpr operator> (int a, const PrimExpr &b)
 
PrimExpr operator> (const PrimExpr &a, int b)
 
PrimExpr operator> (const PrimExpr &a, double b)
 
PrimExpr operator>= (const PrimExpr &a, float b)
 
PrimExpr operator>= (float a, const PrimExpr &b)
 
PrimExpr operator>= (int a, const PrimExpr &b)
 
PrimExpr operator>= (const PrimExpr &a, int b)
 
PrimExpr operator>= (const PrimExpr &a, double b)
 
PrimExpr operator< (const PrimExpr &a, float b)
 
PrimExpr operator< (float a, const PrimExpr &b)
 
PrimExpr operator< (int a, const PrimExpr &b)
 
PrimExpr operator< (const PrimExpr &a, int b)
 
PrimExpr operator< (const PrimExpr &a, double b)
 
PrimExpr operator<= (const PrimExpr &a, float b)
 
PrimExpr operator<= (float a, const PrimExpr &b)
 
PrimExpr operator<= (int a, const PrimExpr &b)
 
PrimExpr operator<= (const PrimExpr &a, int b)
 
PrimExpr operator<= (const PrimExpr &a, double b)
 
PrimExpr max (const PrimExpr &a, float b, Location loc=UnknownLoc())
 
PrimExpr max (float a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr max (int a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr max (const PrimExpr &a, int b, Location loc=UnknownLoc())
 
PrimExpr max (const PrimExpr &a, double b, Location loc=UnknownLoc())
 
PrimExpr min (const PrimExpr &a, float b, Location loc=UnknownLoc())
 
PrimExpr min (float a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr min (int a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr min (const PrimExpr &a, int b, Location loc=UnknownLoc())
 
PrimExpr min (const PrimExpr &a, double b, Location loc=UnknownLoc())
 
PrimExpr div (const PrimExpr &a, float b, Location loc=UnknownLoc())
 
PrimExpr div (float a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr div (int a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr div (const PrimExpr &a, int b, Location loc=UnknownLoc())
 
PrimExpr div (const PrimExpr &a, double b, Location loc=UnknownLoc())
 
PrimExpr add (const PrimExpr &a, float b, Location loc=UnknownLoc())
 
PrimExpr add (float a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr add (int a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr add (const PrimExpr &a, int b, Location loc=UnknownLoc())
 
PrimExpr add (const PrimExpr &a, double b, Location loc=UnknownLoc())
 
PrimExpr sub (const PrimExpr &a, float b, Location loc=UnknownLoc())
 
PrimExpr sub (float a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr sub (int a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr sub (const PrimExpr &a, int b, Location loc=UnknownLoc())
 
PrimExpr sub (const PrimExpr &a, double b, Location loc=UnknownLoc())
 
PrimExpr mul (const PrimExpr &a, float b, Location loc=UnknownLoc())
 
PrimExpr mul (float a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr mul (int a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr mul (const PrimExpr &a, int b, Location loc=UnknownLoc())
 
PrimExpr mul (const PrimExpr &a, double b, Location loc=UnknownLoc())
 
PrimExpr greater (const PrimExpr &a, float b, Location loc=UnknownLoc())
 
PrimExpr greater (float a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr greater (int a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr greater (const PrimExpr &a, int b, Location loc=UnknownLoc())
 
PrimExpr greater (const PrimExpr &a, double b, Location loc=UnknownLoc())
 
PrimExpr greater_equal (const PrimExpr &a, float b, Location loc=UnknownLoc())
 
PrimExpr greater_equal (float a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr greater_equal (int a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr greater_equal (const PrimExpr &a, int b, Location loc=UnknownLoc())
 
PrimExpr greater_equal (const PrimExpr &a, double b, Location loc=UnknownLoc())
 
PrimExpr less (const PrimExpr &a, float b, Location loc=UnknownLoc())
 
PrimExpr less (float a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr less (int a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr less (const PrimExpr &a, int b, Location loc=UnknownLoc())
 
PrimExpr less (const PrimExpr &a, double b, Location loc=UnknownLoc())
 
PrimExpr less_equal (const PrimExpr &a, float b, Location loc=UnknownLoc())
 
PrimExpr less_equal (float a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr less_equal (int a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr less_equal (const PrimExpr &a, int b, Location loc=UnknownLoc())
 
PrimExpr less_equal (const PrimExpr &a, double b, Location loc=UnknownLoc())
 
PrimExpr indexdiv (const PrimExpr &a, int b, Location loc=UnknownLoc())
 
PrimExpr indexdiv (int a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr indexmod (const PrimExpr &a, int b, Location loc=UnknownLoc())
 
PrimExpr indexmod (int a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr truncdiv (const PrimExpr &a, int b, Location loc=UnknownLoc())
 
PrimExpr truncdiv (int a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr truncmod (const PrimExpr &a, int b, Location loc=UnknownLoc())
 
PrimExpr truncmod (int a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr floordiv (const PrimExpr &a, int b, Location loc=UnknownLoc())
 
PrimExpr floordiv (int a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr floormod (const PrimExpr &a, int b, Location loc=UnknownLoc())
 
PrimExpr floormod (int a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr right_shift (const PrimExpr &a, int b, Location loc=UnknownLoc())
 
PrimExpr right_shift (int a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr left_shift (const PrimExpr &a, int b, Location loc=UnknownLoc())
 
PrimExpr left_shift (int a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr bitwise_and (const PrimExpr &a, int b, Location loc=UnknownLoc())
 
PrimExpr bitwise_and (int a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr bitwise_or (const PrimExpr &a, int b, Location loc=UnknownLoc())
 
PrimExpr bitwise_or (int a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr bitwise_xor (const PrimExpr &a, int b, Location loc=UnknownLoc())
 
PrimExpr bitwise_xor (int a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr operator>> (const PrimExpr &a, int b)
 
PrimExpr operator>> (int a, const PrimExpr &b)
 
PrimExpr operator<< (const PrimExpr &a, int b)
 
PrimExpr operator<< (int a, const PrimExpr &b)
 
PrimExpr operator& (const PrimExpr &a, int b)
 
PrimExpr operator& (int a, const PrimExpr &b)
 
PrimExpr operator| (const PrimExpr &a, int b)
 
PrimExpr operator| (int a, const PrimExpr &b)
 
PrimExpr operator^ (const PrimExpr &a, int b)
 
PrimExpr operator^ (int a, const PrimExpr &b)
 
PrimExpr operator&& (const PrimExpr &a, bool b)
 
PrimExpr operator&& (bool a, const PrimExpr &b)
 
PrimExpr operator|| (const PrimExpr &a, bool b)
 
PrimExpr operator|| (bool a, const PrimExpr &b)
 
PrimExpr logical_and (const PrimExpr &a, bool b, Location loc=UnknownLoc())
 
PrimExpr logical_and (bool a, const PrimExpr &b, Location loc=UnknownLoc())
 
PrimExpr logical_or (const PrimExpr &a, bool b, Location loc=UnknownLoc())
 
PrimExpr logical_or (bool a, const PrimExpr &b, Location loc=UnknownLoc())
 
template<typename TA >
void DivAmbiguityError (const TA &a)
 Helper function to raise a compiler error about division ambiguity.
 
template<typename TB >
PrimExpr operator/ (const PrimExpr &a, const TB &b)
 
template<typename TB >
PrimExpr operator/= (const PrimExpr &a, const TB &b)
 
template<typename TB >
PrimExpr operator% (const PrimExpr &a, const TB &b)
 
template<typename TA , typename TB >
PBinaryExpr< prim::Div, TA, TB > operator/ (const Pattern< TA > &a, const Pattern< TB > &b)
 
template<typename TA >
PBinaryExpr< prim::Div, TA, PConstWithTypeLike< TA > > operator/ (const Pattern< TA > &a, int64_t b)
 
template<typename TA >
PBinaryExpr< prim::Div, PConstWithTypeLike< TA >, TA > operator/ (int64_t b, const Pattern< TA > &a)
 
template<typename TA , typename TB >
PBinaryExpr< prim::Mod, TA, TB > operator% (const Pattern< TA > &a, const Pattern< TB > &b)
 
template<typename TA >
PBinaryExpr< prim::Mod, TA, PConstWithTypeLike< TA > > operator% (const Pattern< TA > &a, int64_t b)
 
template<typename TA >
PBinaryExpr< prim::Mod, PConstWithTypeLike< TA >, TA > operator% (int64_t b, const Pattern< TA > &a)
 
template<typename TA , typename TB >
PBinaryExpr< prim::Add, TA, TB > operator+ (const Pattern< TA > &a, const Pattern< TB > &b)
 
template<typename TA >
PBinaryExpr< prim::Add, TA, PConstWithTypeLike< TA > > operator+ (const Pattern< TA > &a, int64_t b)
 
template<typename TA >
PBinaryExpr< prim::Add, PConstWithTypeLike< TA >, TA > operator+ (int64_t b, const Pattern< TA > &a)
 
template<typename TA , typename TB >
PBinaryExpr< prim::Sub, TA, TB > operator- (const Pattern< TA > &a, const Pattern< TB > &b)
 
template<typename TA >
PBinaryExpr< prim::Sub, TA, PConstWithTypeLike< TA > > operator- (const Pattern< TA > &a, int64_t b)
 
template<typename TA >
PBinaryExpr< prim::Sub, PConstWithTypeLike< TA >, TA > operator- (int64_t b, const Pattern< TA > &a)
 
template<typename TA , typename TB >
PBinaryExpr< prim::Mul, TA, TB > operator* (const Pattern< TA > &a, const Pattern< TB > &b)
 
template<typename TA >
PBinaryExpr< prim::Mul, TA, PConstWithTypeLike< TA > > operator* (const Pattern< TA > &a, int64_t b)
 
template<typename TA >
PBinaryExpr< prim::Mul, PConstWithTypeLike< TA >, TA > operator* (int64_t b, const Pattern< TA > &a)
 
template<typename TA , typename TB >
PBinaryExpr< prim::Min, TA, TB > min (const Pattern< TA > &a, const Pattern< TB > &b)
 
template<typename TA >
PBinaryExpr< prim::Min, TA, PConstWithTypeLike< TA > > min (const Pattern< TA > &a, int64_t b)
 
template<typename TA >
PBinaryExpr< prim::Min, PConstWithTypeLike< TA >, TA > min (int64_t b, const Pattern< TA > &a)
 
template<typename TA , typename TB >
PBinaryExpr< prim::Max, TA, TB > max (const Pattern< TA > &a, const Pattern< TB > &b)
 
template<typename TA >
PBinaryExpr< prim::Max, TA, PConstWithTypeLike< TA > > max (const Pattern< TA > &a, int64_t b)
 
template<typename TA >
PBinaryExpr< prim::Max, PConstWithTypeLike< TA >, TA > max (int64_t b, const Pattern< TA > &a)
 
template<typename TA , typename TB >
PBinaryExpr< prim::Div, TA, TB > div (const Pattern< TA > &a, const Pattern< TB > &b)
 
template<typename TA >
PBinaryExpr< prim::Div, TA, PConstWithTypeLike< TA > > div (const Pattern< TA > &a, int64_t b)
 
template<typename TA >
PBinaryExpr< prim::Div, PConstWithTypeLike< TA >, TA > div (int64_t b, const Pattern< TA > &a)
 
template<typename TA , typename TB >
PBinaryExpr< prim::Div, TA, TB > truncdiv (const Pattern< TA > &a, const Pattern< TB > &b)
 
template<typename TA >
PBinaryExpr< prim::Div, TA, PConstWithTypeLike< TA > > truncdiv (const Pattern< TA > &a, int64_t b)
 
template<typename TA >
PBinaryExpr< prim::Div, PConstWithTypeLike< TA >, TA > truncdiv (int64_t b, const Pattern< TA > &a)
 
template<typename TA , typename TB >
PBinaryExpr< prim::Mod, TA, TB > truncmod (const Pattern< TA > &a, const Pattern< TB > &b)
 
template<typename TA >
PBinaryExpr< prim::Mod, TA, PConstWithTypeLike< TA > > truncmod (const Pattern< TA > &a, int64_t b)
 
template<typename TA >
PBinaryExpr< prim::Mod, PConstWithTypeLike< TA >, TA > truncmod (int64_t b, const Pattern< TA > &a)
 
template<typename TA , typename TB >
PBinaryExpr< prim::FloorDiv, TA, TB > floordiv (const Pattern< TA > &a, const Pattern< TB > &b)
 
template<typename TA >
PBinaryExpr< prim::FloorDiv, TA, PConstWithTypeLike< TA > > floordiv (const Pattern< TA > &a, int64_t b)
 
template<typename TA >
PBinaryExpr< prim::FloorDiv, PConstWithTypeLike< TA >, TA > floordiv (int64_t b, const Pattern< TA > &a)
 
template<typename TA , typename TB >
PBinaryExpr< prim::FloorMod, TA, TB > floormod (const Pattern< TA > &a, const Pattern< TB > &b)
 
template<typename TA >
PBinaryExpr< prim::FloorMod, TA, PConstWithTypeLike< TA > > floormod (const Pattern< TA > &a, int64_t b)
 
template<typename TA >
PBinaryExpr< prim::FloorMod, PConstWithTypeLike< TA >, TA > floormod (int64_t b, const Pattern< TA > &a)
 
template<typename TA , typename TB >
PBinaryExpr< prim::LShift, TA, TB, false > operator<< (const Pattern< TA > &a, const Pattern< TB > &b)
 
template<typename TA , typename TB >
PBinaryExpr< prim::RShift, TA, TB, false > operator>> (const Pattern< TA > &a, const Pattern< TB > &b)
 
template<typename TA , typename TB >
PBinaryExpr< prim::BitwiseAnd, TA, TB, false > operator& (const Pattern< TA > &a, const Pattern< TB > &b)
 
template<typename TA , typename TB >
PBinaryExpr< prim::BitwiseOr, TA, TB, false > operator| (const Pattern< TA > &a, const Pattern< TB > &b)
 
template<typename TA , typename TB >
PBinaryExpr< prim::BitwiseXor, TA, TB, false > operator^ (const Pattern< TA > &a, const Pattern< TB > &b)
 
template<typename TA , typename TB >
PBinaryExpr< prim::GT, TA, TB > operator> (const Pattern< TA > &a, const Pattern< TB > &b)
 
template<typename TA >
PBinaryExpr< prim::GT, TA, PConstWithTypeLike< TA > > operator> (const Pattern< TA > &a, int64_t b)
 
template<typename TA >
PBinaryExpr< prim::GT, PConstWithTypeLike< TA >, TA > operator> (int64_t b, const Pattern< TA > &a)
 
template<typename TA , typename TB >
PBinaryExpr< prim::GE, TA, TB > operator>= (const Pattern< TA > &a, const Pattern< TB > &b)
 
template<typename TA >
PBinaryExpr< prim::GE, TA, PConstWithTypeLike< TA > > operator>= (const Pattern< TA > &a, int64_t b)
 
template<typename TA >
PBinaryExpr< prim::GE, PConstWithTypeLike< TA >, TA > operator>= (int64_t b, const Pattern< TA > &a)
 
template<typename TA , typename TB >
PBinaryExpr< prim::LT, TA, TB > operator< (const Pattern< TA > &a, const Pattern< TB > &b)
 
template<typename TA >
PBinaryExpr< prim::LT, TA, PConstWithTypeLike< TA > > operator< (const Pattern< TA > &a, int64_t b)
 
template<typename TA >
PBinaryExpr< prim::LT, PConstWithTypeLike< TA >, TA > operator< (int64_t b, const Pattern< TA > &a)
 
template<typename TA , typename TB >
PBinaryExpr< prim::LE, TA, TB > operator<= (const Pattern< TA > &a, const Pattern< TB > &b)
 
template<typename TA >
PBinaryExpr< prim::LE, TA, PConstWithTypeLike< TA > > operator<= (const Pattern< TA > &a, int64_t b)
 
template<typename TA >
PBinaryExpr< prim::LE, PConstWithTypeLike< TA >, TA > operator<= (int64_t b, const Pattern< TA > &a)
 
template<typename TA , typename TB >
PBinaryExpr< prim::EQ, TA, TB > operator== (const Pattern< TA > &a, const Pattern< TB > &b)
 
template<typename TA >
PBinaryExpr< prim::EQ, TA, PConstWithTypeLike< TA > > operator== (const Pattern< TA > &a, int64_t b)
 
template<typename TA >
PBinaryExpr< prim::EQ, PConstWithTypeLike< TA >, TA > operator== (int64_t b, const Pattern< TA > &a)
 
template<typename TA , typename TB >
PBinaryExpr< prim::NE, TA, TB > operator!= (const Pattern< TA > &a, const Pattern< TB > &b)
 
template<typename TA >
PBinaryExpr< prim::NE, TA, PConstWithTypeLike< TA > > operator!= (const Pattern< TA > &a, int64_t b)
 
template<typename TA >
PBinaryExpr< prim::NE, PConstWithTypeLike< TA >, TA > operator!= (int64_t b, const Pattern< TA > &a)
 
template<typename TA , typename TB >
PBinaryExpr< prim::And, TA, TB > operator&& (const Pattern< TA > &a, const Pattern< TB > &b)
 
template<typename TA >
PBinaryExpr< prim::And, TA, PConstWithTypeLike< TA > > operator&& (const Pattern< TA > &a, int64_t b)
 
template<typename TA >
PBinaryExpr< prim::And, PConstWithTypeLike< TA >, TA > operator&& (int64_t b, const Pattern< TA > &a)
 
template<typename TA , typename TB >
PBinaryExpr< prim::Or, TA, TB > operator|| (const Pattern< TA > &a, const Pattern< TB > &b)
 
template<typename TA >
PBinaryExpr< prim::Or, TA, PConstWithTypeLike< TA > > operator|| (const Pattern< TA > &a, int64_t b)
 
template<typename TA >
PBinaryExpr< prim::Or, PConstWithTypeLike< TA >, TA > operator|| (int64_t b, const Pattern< TA > &a)
 
template<typename TA >
PNotExpr< TA > operator! (const Pattern< TA > &value)
 
template<typename TA >
PBitwiseNotExpr< TA > operator~ (const Pattern< TA > &value)
 
template<typename TCond , typename TA , typename TB >
PSelectExpr< TCond, TA, TB > select (const Pattern< TCond > &condition, const Pattern< TA > &true_value, const Pattern< TB > &false_value)
 Construct a select pattern.
 
template<typename DType , typename TA >
PCastExpr< DType, TA > cast (const Pattern< TA > &value, const Pattern< DType > &dtype)
 Construct a cast pattern.
 
template<typename TBase , typename TStride , typename TLanes >
PRampExpr< TBase, TStride, TLanes > ramp (const Pattern< TBase > &base, const Pattern< TStride > &stride, const Pattern< TLanes > &lanes)
 Construct a ramp pattern.
 
template<typename TBase >
PRampExpr< TBase, PConstWithTypeLike< TBase >, PConstWithTypeLike< TBase > > ramp (const Pattern< TBase > &base, int stride, int lanes)
 
template<typename TA , typename TLanes >
PBroadcastExpr< TA, TLanes > broadcast (const Pattern< TA > &value, const Pattern< TLanes > &lanes)
 Construct a broadcast pattern.
 
template<typename TCond , typename TA , typename TB >
PCallExpr< PIfThenElseOp, TCond, TA, TB > if_then_else (const Pattern< TCond > &cond, const Pattern< TA > &true_value, const Pattern< TB > &false_value)
 Construct a if_then_else pattern.
 
TVM_TIRX_DLL bool IsRegionOp (const Op &op)
 Check FRegionGetBodyParams registration without invoking it or creating variables.
 
TVM_TIRX_DLL ffi::Array< Var > GetRegionBodyParams (Op op, ffi::Array< Expr > args, DictAttrs attrs)
 Validate region operands and construct fresh typed body parameters.
 
TVM_TIRX_DLL std::ostream & operator<< (std::ostream &os, ForKind kind)
 
const char * ForKind2String (ForKind t)
 
bool operator== (const PrimType &lhs, const PrimType &rhs)
 
bool operator!= (const PrimType &lhs, const PrimType &rhs)
 
Type VoidType ()
 
bool IsVoidType (const Type &type)
 Check whether the tyep represents void.
 
TVM_TIRX_DLL ffi::String Script (const ffi::ObjectRef &node, const ffi::Optional< PrinterConfig > &config=std::nullopt)
 Print an IR object as TVMScript, using repr when no translation hook exists.
 

Detailed Description

An object that builds and maintains block scope and StmtSref mapping for Dependence analysis.

Typedef Documentation

◆ Device

using tvm::Device = typedef DLDevice

◆ FInferType

using tvm::FInferType = typedef decltype(op_attr::kInferType)::ValueType

◆ FRegionGetBodyParams

using tvm::FRegionGetBodyParams = typedef decltype(op_attr::kRegionGetBodyParams)::ValueType

◆ FRegionValidate

using tvm::FRegionValidate = typedef decltype(op_attr::kRegionValidate)::ValueType

◆ FTargetCanonicalizer

using tvm::FTargetCanonicalizer = typedef ffi::TypedFunction<ffi::Map<ffi::String, ffi::Any>(ffi::Map<ffi::String, ffi::Any>)>

Target canonicalizer applied on instantiation of a given TargetKind.

Parameters
target_jsonTarget in JSON format to be transformed during canonicalization.
Returns
The transformed Target JSON object.

◆ SubscriptSlice

using tvm::SubscriptSlice = typedef ffi::Array<ffi::Variant< ffi::Tuple<ffi::Optional<PrimExpr>, ffi::Optional<PrimExpr>, ffi::Optional<PrimExpr> >, PrimExpr> >

Expression subscripts: point indices or (start, stop, step) slices.

◆ TFixedReturnType

using tvm::TFixedReturnType = typedef decltype(op_attr::kFixedReturnType)::ValueType

Enumeration Type Documentation

◆ CallEffectKind

enum class tvm::CallEffectKind : int
strong

The effect type of the call.

Enumerator
kExprAnnotation 

Function corresponds to an annotation(e.g. likely) and can translate to identity.

kPure 

Pure function that do not interacts with any external state.

kReadState 

Function's that may read from states(e.g. RAM)

kUpdateState 

Function that may read/write from states(e.g. RAM).

kOpaque 

Opaque function, cannot make any assumption.

kSpecialCallArg 

Special intrinsic to annotate call arguments info only valid as a direct argument to a call.

kEmbedInfo 

Embed opaque information in the Expr, cannot be codegen.

kControlJump 

Function that changes control flow.

◆ CallingConv

enum class tvm::CallingConv : int
strong

Possible Calling conventions.

NOTE: The calling convention also implies the way we implement the function during lowering.

Enumerator
kDefault 

Default calling convention.

  • Uses the native calling convention of the target.
  • Implementation: specified by the native target.
kCPackedFunc 

ffi::Function that exposes a Cffi::Function signature.

  • Calling by ffi::Function calling convention.
  • Implementation: Expose a function with the Cffi::Function signature.
kDeviceKernelLaunch 

Device kernel launch.

  • Call by ffi::Function calling convention.
  • Implementation: defined by device runtime(e.g. runtime/cuda)

◆ ForKind

enum class tvm::ForKind : int
strong

The kind of the loop.

ForKind can change the control flow semantics of the loop. So the kind field needs to be considered in all TIR passes.

Enumerator
kDefault 

Ordinary loop with sequential iteration semantics.

kParallel 

Parallel execution.

kVectorized 

Vector SIMD loop. The loop body will be vectorized.

kUnrolled 

The loop body must be unrolled.

◆ LinkageType

enum class tvm::LinkageType : int
strong

Supported linkage types.

Enumerator
kInternal 

Internal linkage.

kExternal 

External linkage.

  • Function with external linkage should have a global symbol attached to it.

Function Documentation

◆ add() [1/6]

PrimExpr tvm::add ( const PrimExpr &  a,
double  b,
Location  loc = UnknownLoc() 
)
inline

◆ add() [2/6]

PrimExpr tvm::add ( const PrimExpr &  a,
float  b,
Location  loc = UnknownLoc() 
)
inline

◆ add() [3/6]

PrimExpr tvm::add ( const PrimExpr &  a,
int  b,
Location  loc = UnknownLoc() 
)
inline

◆ add() [4/6]

PrimExpr tvm::add ( float  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ add() [5/6]

PrimExpr tvm::add ( int  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ add() [6/6]

TVM_TIRX_DLL PrimExpr tvm::add ( PrimExpr  a,
PrimExpr  b,
Location  loc = UnknownLoc() 
)

add operator

Parameters
aleft operand
bright operand
locThe location of this operation in the source.
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ bitwise_and() [1/3]

PrimExpr tvm::bitwise_and ( const PrimExpr &  a,
int  b,
Location  loc = UnknownLoc() 
)
inline

◆ bitwise_and() [2/3]

PrimExpr tvm::bitwise_and ( int  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ bitwise_and() [3/3]

TVM_TIRX_DLL PrimExpr tvm::bitwise_and ( PrimExpr  a,
PrimExpr  b,
Location  loc = UnknownLoc() 
)

take bitwise and of two values

Parameters
aleft operand
bright operand
locThe location of this operation in the source.
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ bitwise_neg()

TVM_TIRX_DLL PrimExpr tvm::bitwise_neg ( PrimExpr  a,
Location  loc = UnknownLoc() 
)

take bitwise negation of two values

Parameters
athe input expression.
locThe location of this operation in the source.
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ bitwise_or() [1/3]

PrimExpr tvm::bitwise_or ( const PrimExpr &  a,
int  b,
Location  loc = UnknownLoc() 
)
inline

◆ bitwise_or() [2/3]

PrimExpr tvm::bitwise_or ( int  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ bitwise_or() [3/3]

TVM_TIRX_DLL PrimExpr tvm::bitwise_or ( PrimExpr  a,
PrimExpr  b,
Location  loc = UnknownLoc() 
)

take bitwise or of two values

Parameters
aleft operand
bright operand
locThe location of this operation in the source.
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ bitwise_xor() [1/3]

PrimExpr tvm::bitwise_xor ( const PrimExpr &  a,
int  b,
Location  loc = UnknownLoc() 
)
inline

◆ bitwise_xor() [2/3]

PrimExpr tvm::bitwise_xor ( int  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ bitwise_xor() [3/3]

TVM_TIRX_DLL PrimExpr tvm::bitwise_xor ( PrimExpr  a,
PrimExpr  b,
Location  loc = UnknownLoc() 
)

take bitwise xor of two values

Parameters
aleft operand
bright operand
locThe location of this operation in the source.
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ broadcast()

template<typename TA , typename TLanes >
PBroadcastExpr< TA, TLanes > tvm::broadcast ( const Pattern< TA > &  value,
const Pattern< TLanes > &  lanes 
)
inline

Construct a broadcast pattern.

Parameters
valueThe value pattern.
lanesThe lanes pattern.
Returns
The result pattern.
Template Parameters
TAThe pattern type of the value.
TLanesThe pattern type of the lanes.

◆ cast()

template<typename DType , typename TA >
PCastExpr< DType, TA > tvm::cast ( const Pattern< TA > &  value,
const Pattern< DType > &  dtype 
)
inline

Construct a cast pattern.

Parameters
valueThe input value.
dtypeThe target data type, can be PVar<DLDataType> or PConst<DLDataType>.
Returns
The result pattern.
Template Parameters
DTypeThe pattern type of type.
TAThe pattern type of value.

◆ ceildiv()

TVM_TIRX_DLL PrimExpr tvm::ceildiv ( PrimExpr  a,
PrimExpr  b,
Location  loc = UnknownLoc() 
)

compute ceil(a / b)

Parameters
aleft operand
bright operand
locThe location of this operation in the source.
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ div() [1/9]

template<typename TA , typename TB >
PBinaryExpr< prim::Div, TA, TB > tvm::div ( const Pattern< TA > &  a,
const Pattern< TB > &  b 
)
inline

◆ div() [2/9]

template<typename TA >
PBinaryExpr< prim::Div, TA, PConstWithTypeLike< TA > > tvm::div ( const Pattern< TA > &  a,
int64_t  b 
)
inline

◆ div() [3/9]

PrimExpr tvm::div ( const PrimExpr &  a,
double  b,
Location  loc = UnknownLoc() 
)
inline

◆ div() [4/9]

PrimExpr tvm::div ( const PrimExpr &  a,
float  b,
Location  loc = UnknownLoc() 
)
inline

◆ div() [5/9]

PrimExpr tvm::div ( const PrimExpr &  a,
int  b,
Location  loc = UnknownLoc() 
)
inline

◆ div() [6/9]

PrimExpr tvm::div ( float  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ div() [7/9]

PrimExpr tvm::div ( int  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ div() [8/9]

template<typename TA >
PBinaryExpr< prim::Div, PConstWithTypeLike< TA >, TA > tvm::div ( int64_t  b,
const Pattern< TA > &  a 
)
inline

◆ div() [9/9]

TVM_TIRX_DLL PrimExpr tvm::div ( PrimExpr  a,
PrimExpr  b,
Location  loc = UnknownLoc() 
)

compute division in C semantics.

a / b as in C/C++.

When operands are integers, it directly corresponds to truncdiv.

Parameters
aleft operand
bright operand
locThe location of this operation in the source.
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ DivAmbiguityError()

template<typename TA >
void tvm::DivAmbiguityError ( const TA &  a)
inline

Helper function to raise a compiler error about division ambiguity.

Note
The call to this function will always results in a compiler error.
Template Parameters
TAAny class type.

◆ equal()

TVM_TIRX_DLL PrimExpr tvm::equal ( PrimExpr  a,
PrimExpr  b,
Location  loc = UnknownLoc() 
)

equal

Parameters
aleft operand
bright operand
locThe location of this operation in the source.
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ floordiv() [1/6]

template<typename TA , typename TB >
PBinaryExpr< prim::FloorDiv, TA, TB > tvm::floordiv ( const Pattern< TA > &  a,
const Pattern< TB > &  b 
)
inline

◆ floordiv() [2/6]

template<typename TA >
PBinaryExpr< prim::FloorDiv, TA, PConstWithTypeLike< TA > > tvm::floordiv ( const Pattern< TA > &  a,
int64_t  b 
)
inline

◆ floordiv() [3/6]

PrimExpr tvm::floordiv ( const PrimExpr &  a,
int  b,
Location  loc = UnknownLoc() 
)
inline

◆ floordiv() [4/6]

PrimExpr tvm::floordiv ( int  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ floordiv() [5/6]

template<typename TA >
PBinaryExpr< prim::FloorDiv, PConstWithTypeLike< TA >, TA > tvm::floordiv ( int64_t  b,
const Pattern< TA > &  a 
)
inline

◆ floordiv() [6/6]

TVM_TIRX_DLL PrimExpr tvm::floordiv ( PrimExpr  a,
PrimExpr  b,
Location  loc = UnknownLoc() 
)

compute floor(a / b)

Parameters
aleft operand
bright operand
locThe location of this operation in the source.
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ floormod() [1/6]

template<typename TA , typename TB >
PBinaryExpr< prim::FloorMod, TA, TB > tvm::floormod ( const Pattern< TA > &  a,
const Pattern< TB > &  b 
)
inline

◆ floormod() [2/6]

template<typename TA >
PBinaryExpr< prim::FloorMod, TA, PConstWithTypeLike< TA > > tvm::floormod ( const Pattern< TA > &  a,
int64_t  b 
)
inline

◆ floormod() [3/6]

PrimExpr tvm::floormod ( const PrimExpr &  a,
int  b,
Location  loc = UnknownLoc() 
)
inline

◆ floormod() [4/6]

PrimExpr tvm::floormod ( int  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ floormod() [5/6]

template<typename TA >
PBinaryExpr< prim::FloorMod, PConstWithTypeLike< TA >, TA > tvm::floormod ( int64_t  b,
const Pattern< TA > &  a 
)
inline

◆ floormod() [6/6]

TVM_TIRX_DLL PrimExpr tvm::floormod ( PrimExpr  a,
PrimExpr  b,
Location  loc = UnknownLoc() 
)

compute the remainder of floordiv

Parameters
aleft operand
bright operand
locThe location of this operation in the source.
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ ForKind2String()

const char * tvm::ForKind2String ( ForKind  t)
inline

◆ GetRegionBodyParams()

TVM_TIRX_DLL ffi::Array< Var > tvm::GetRegionBodyParams ( Op  op,
ffi::Array< Expr >  args,
DictAttrs  attrs 
)

Validate region operands and construct fresh typed body parameters.

Parameters
opThe region operation.
argsOperands evaluated in the enclosing scope.
attrsAttributes evaluated in the enclosing scope.
Returns
Parameters from the required FRegionGetBodyParams hook.
Exceptions
ValueErrorif the operation has no registered region hook.

◆ greater() [1/6]

PrimExpr tvm::greater ( const PrimExpr &  a,
double  b,
Location  loc = UnknownLoc() 
)
inline

◆ greater() [2/6]

PrimExpr tvm::greater ( const PrimExpr &  a,
float  b,
Location  loc = UnknownLoc() 
)
inline

◆ greater() [3/6]

PrimExpr tvm::greater ( const PrimExpr &  a,
int  b,
Location  loc = UnknownLoc() 
)
inline

◆ greater() [4/6]

PrimExpr tvm::greater ( float  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ greater() [5/6]

PrimExpr tvm::greater ( int  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ greater() [6/6]

TVM_TIRX_DLL PrimExpr tvm::greater ( PrimExpr  a,
PrimExpr  b,
Location  loc = UnknownLoc() 
)

greater

Parameters
aleft operand
bright operand
locThe location of this operation in the source.
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ greater_equal() [1/6]

PrimExpr tvm::greater_equal ( const PrimExpr &  a,
double  b,
Location  loc = UnknownLoc() 
)
inline

◆ greater_equal() [2/6]

PrimExpr tvm::greater_equal ( const PrimExpr &  a,
float  b,
Location  loc = UnknownLoc() 
)
inline

◆ greater_equal() [3/6]

PrimExpr tvm::greater_equal ( const PrimExpr &  a,
int  b,
Location  loc = UnknownLoc() 
)
inline

◆ greater_equal() [4/6]

PrimExpr tvm::greater_equal ( float  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ greater_equal() [5/6]

PrimExpr tvm::greater_equal ( int  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ greater_equal() [6/6]

TVM_TIRX_DLL PrimExpr tvm::greater_equal ( PrimExpr  a,
PrimExpr  b,
Location  loc = UnknownLoc() 
)

greater_equal

Parameters
aleft operand
bright operand
locThe location of this operation in the source.
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ if_then_else() [1/2]

template<typename TCond , typename TA , typename TB >
PCallExpr< PIfThenElseOp, TCond, TA, TB > tvm::if_then_else ( const Pattern< TCond > &  cond,
const Pattern< TA > &  true_value,
const Pattern< TB > &  false_value 
)
inline

Construct a if_then_else pattern.

Parameters
condThe condition expression.
true_valueThe value when condition is true.
false_valueThe value when condition is false.
Returns
The result pattern.
Template Parameters
TCondThe pattern type of the condition.
TAThe pattern type of the true operand.
TBThe pattern type of the false operand.

◆ if_then_else() [2/2]

TVM_TIRX_DLL PrimExpr tvm::if_then_else ( PrimExpr  cond,
PrimExpr  true_value,
PrimExpr  false_value,
Location  loc = UnknownLoc() 
)

Conditional expression.

Parameters
condThe condition
true_valueThe value when results are true.
false_valueThe value when results are false.
locThe location of this operation in the source.
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ indexdiv() [1/3]

PrimExpr tvm::indexdiv ( const PrimExpr &  a,
int  b,
Location  loc = UnknownLoc() 
)
inline

◆ indexdiv() [2/3]

PrimExpr tvm::indexdiv ( int  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ indexdiv() [3/3]

TVM_TIRX_DLL PrimExpr tvm::indexdiv ( PrimExpr  a,
PrimExpr  b,
Location  loc = UnknownLoc() 
)

compute floor(a / b) where a and b are non-negative.

Use this function for index split calculation.

This function might take advantage of the fact that a and b are non-negative.

Parameters
aleft operand
bright operand
locThe location of this operation in the source.
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ indexmod() [1/3]

PrimExpr tvm::indexmod ( const PrimExpr &  a,
int  b,
Location  loc = UnknownLoc() 
)
inline

◆ indexmod() [2/3]

PrimExpr tvm::indexmod ( int  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ indexmod() [3/3]

TVM_TIRX_DLL PrimExpr tvm::indexmod ( PrimExpr  a,
PrimExpr  b,
Location  loc = UnknownLoc() 
)

compute the remainder floor(a / b) where a and b are non-negative.

Use this function for index split calculation. This function might take advantage of the fact that a and b are non-negative.

Parameters
aleft operand
bright operand
locThe location of this operation in the source.
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ IsRegionOp()

TVM_TIRX_DLL bool tvm::IsRegionOp ( const Op &  op)

Check FRegionGetBodyParams registration without invoking it or creating variables.

◆ IsVoidType()

bool tvm::IsVoidType ( const Type &  type)
inline

Check whether the tyep represents void.

Returns
The check result.

◆ left_shift() [1/3]

PrimExpr tvm::left_shift ( const PrimExpr &  a,
int  b,
Location  loc = UnknownLoc() 
)
inline

◆ left_shift() [2/3]

PrimExpr tvm::left_shift ( int  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ left_shift() [3/3]

TVM_TIRX_DLL PrimExpr tvm::left_shift ( PrimExpr  a,
PrimExpr  b,
Location  loc = UnknownLoc() 
)

left shift operator

Parameters
aleft operand
bright operand
locThe location of this operation in the source.
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ less() [1/6]

PrimExpr tvm::less ( const PrimExpr &  a,
double  b,
Location  loc = UnknownLoc() 
)
inline

◆ less() [2/6]

PrimExpr tvm::less ( const PrimExpr &  a,
float  b,
Location  loc = UnknownLoc() 
)
inline

◆ less() [3/6]

PrimExpr tvm::less ( const PrimExpr &  a,
int  b,
Location  loc = UnknownLoc() 
)
inline

◆ less() [4/6]

PrimExpr tvm::less ( float  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ less() [5/6]

PrimExpr tvm::less ( int  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ less() [6/6]

TVM_TIRX_DLL PrimExpr tvm::less ( PrimExpr  a,
PrimExpr  b,
Location  loc = UnknownLoc() 
)

less

Parameters
aleft operand
bright operand
locThe location of this operation in the source.
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ less_equal() [1/6]

PrimExpr tvm::less_equal ( const PrimExpr &  a,
double  b,
Location  loc = UnknownLoc() 
)
inline

◆ less_equal() [2/6]

PrimExpr tvm::less_equal ( const PrimExpr &  a,
float  b,
Location  loc = UnknownLoc() 
)
inline

◆ less_equal() [3/6]

PrimExpr tvm::less_equal ( const PrimExpr &  a,
int  b,
Location  loc = UnknownLoc() 
)
inline

◆ less_equal() [4/6]

PrimExpr tvm::less_equal ( float  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ less_equal() [5/6]

PrimExpr tvm::less_equal ( int  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ less_equal() [6/6]

TVM_TIRX_DLL PrimExpr tvm::less_equal ( PrimExpr  a,
PrimExpr  b,
Location  loc = UnknownLoc() 
)

less_equal

Parameters
aleft operand
bright operand
locThe location of this operation in the source.
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ likely()

TVM_TIRX_DLL PrimExpr tvm::likely ( PrimExpr  cond,
Location  loc = UnknownLoc() 
)

Mark condition as likely.

Parameters
condThe condition
locThe location of this operation in the source.
Returns
The marked expression.

◆ logical_and() [1/3]

PrimExpr tvm::logical_and ( bool  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ logical_and() [2/3]

PrimExpr tvm::logical_and ( const PrimExpr &  a,
bool  b,
Location  loc = UnknownLoc() 
)
inline

◆ logical_and() [3/3]

TVM_TIRX_DLL PrimExpr tvm::logical_and ( PrimExpr  a,
PrimExpr  b,
Location  loc = UnknownLoc() 
)

and

Parameters
aleft operand
bright operand
locThe location of this operation in the source.
Returns
The result expression.
Note
This operator does eager constant folding.

◆ logical_not()

TVM_TIRX_DLL PrimExpr tvm::logical_not ( PrimExpr  a,
Location  loc = UnknownLoc() 
)

not

Parameters
aleft operand
locThe location of this operation in the source.
Returns
The result expression.
Note
This operator does eager constant folding.

◆ logical_or() [1/3]

PrimExpr tvm::logical_or ( bool  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ logical_or() [2/3]

PrimExpr tvm::logical_or ( const PrimExpr &  a,
bool  b,
Location  loc = UnknownLoc() 
)
inline

◆ logical_or() [3/3]

TVM_TIRX_DLL PrimExpr tvm::logical_or ( PrimExpr  a,
PrimExpr  b,
Location  loc = UnknownLoc() 
)

or

Parameters
aleft operand
bright operand
locThe location of this operation in the source.
Returns
The result expression.
Note
This operator does eager constant folding.

◆ MatchesOneOf()

template<typename... TPattern>
std::enable_if_t<(std::is_base_of_v< Pattern< TPattern >, TPattern > &&... &&true), PMatchesOneOf< TPattern... > > tvm::MatchesOneOf ( const TPattern &...  patterns)
inline

◆ max() [1/10]

template<typename TA , typename TB >
PBinaryExpr< prim::Max, TA, TB > tvm::max ( const Pattern< TA > &  a,
const Pattern< TB > &  b 
)
inline

◆ max() [2/10]

template<typename TA >
PBinaryExpr< prim::Max, TA, PConstWithTypeLike< TA > > tvm::max ( const Pattern< TA > &  a,
int64_t  b 
)
inline

◆ max() [3/10]

PrimExpr tvm::max ( const PrimExpr &  a,
double  b,
Location  loc = UnknownLoc() 
)
inline

◆ max() [4/10]

PrimExpr tvm::max ( const PrimExpr &  a,
float  b,
Location  loc = UnknownLoc() 
)
inline

◆ max() [5/10]

PrimExpr tvm::max ( const PrimExpr &  a,
int  b,
Location  loc = UnknownLoc() 
)
inline

◆ max() [6/10]

PrimExpr tvm::max ( float  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ max() [7/10]

PrimExpr tvm::max ( int  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ max() [8/10]

template<typename TA >
PBinaryExpr< prim::Max, PConstWithTypeLike< TA >, TA > tvm::max ( int64_t  b,
const Pattern< TA > &  a 
)
inline

◆ max() [9/10]

TVM_TIRX_DLL PrimExpr tvm::max ( PrimExpr  a,
PrimExpr  b,
Location  loc = UnknownLoc() 
)

take maximum of two values

Parameters
aleft operand
bright operand
locThe location of this operation in the source.
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ max() [10/10]

PrimExpr tvm::max ( PrimExpr  source,
ffi::Array< s_tir::IterVar >  axis,
ffi::Array< PrimExpr >  init = {},
Location  loc = UnknownLoc() 
)

max of source expression over axis

Parameters
sourceThe source expression.
axisList of iteration variables that will be used for reduction.
initThe value with which to initialize the output.
locThe location of this operation in the source.
Returns
The result.

◆ min() [1/10]

template<typename TA , typename TB >
PBinaryExpr< prim::Min, TA, TB > tvm::min ( const Pattern< TA > &  a,
const Pattern< TB > &  b 
)
inline

◆ min() [2/10]

template<typename TA >
PBinaryExpr< prim::Min, TA, PConstWithTypeLike< TA > > tvm::min ( const Pattern< TA > &  a,
int64_t  b 
)
inline

◆ min() [3/10]

PrimExpr tvm::min ( const PrimExpr &  a,
double  b,
Location  loc = UnknownLoc() 
)
inline

◆ min() [4/10]

PrimExpr tvm::min ( const PrimExpr &  a,
float  b,
Location  loc = UnknownLoc() 
)
inline

◆ min() [5/10]

PrimExpr tvm::min ( const PrimExpr &  a,
int  b,
Location  loc = UnknownLoc() 
)
inline

◆ min() [6/10]

PrimExpr tvm::min ( float  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ min() [7/10]

PrimExpr tvm::min ( int  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ min() [8/10]

template<typename TA >
PBinaryExpr< prim::Min, PConstWithTypeLike< TA >, TA > tvm::min ( int64_t  b,
const Pattern< TA > &  a 
)
inline

◆ min() [9/10]

TVM_TIRX_DLL PrimExpr tvm::min ( PrimExpr  a,
PrimExpr  b,
Location  loc = UnknownLoc() 
)

take minimum of two values

Parameters
aleft operand
bright operand
locThe location of this operation in the source.
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ min() [10/10]

PrimExpr tvm::min ( PrimExpr  source,
ffi::Array< s_tir::IterVar >  axis,
ffi::Array< PrimExpr >  init = {},
Location  loc = UnknownLoc() 
)

max of source expression over axis

Parameters
sourceThe source expression.
axisList of iteration variables that will be used for reduction.
initThe value with which to initialize the output.
locThe location of this operation in the source.
Returns
The result.

◆ mul() [1/6]

PrimExpr tvm::mul ( const PrimExpr &  a,
double  b,
Location  loc = UnknownLoc() 
)
inline

◆ mul() [2/6]

PrimExpr tvm::mul ( const PrimExpr &  a,
float  b,
Location  loc = UnknownLoc() 
)
inline

◆ mul() [3/6]

PrimExpr tvm::mul ( const PrimExpr &  a,
int  b,
Location  loc = UnknownLoc() 
)
inline

◆ mul() [4/6]

PrimExpr tvm::mul ( float  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ mul() [5/6]

PrimExpr tvm::mul ( int  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ mul() [6/6]

TVM_TIRX_DLL PrimExpr tvm::mul ( PrimExpr  a,
PrimExpr  b,
Location  loc = UnknownLoc() 
)

multiplication operator

Parameters
aleft operand
bright operand
locThe location of this operation in the source.
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ neg()

TVM_TIRX_DLL PrimExpr tvm::neg ( PrimExpr  a,
Location  loc = UnknownLoc() 
)

negation.

Parameters
ainput.
locThe location of this operation in the source.
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ not_equal()

TVM_TIRX_DLL PrimExpr tvm::not_equal ( PrimExpr  a,
PrimExpr  b,
Location  loc = UnknownLoc() 
)

not_equal

Parameters
aleft operand
bright operand
locThe location of this operation in the source.
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ operator!() [1/2]

template<typename TA >
PNotExpr< TA > tvm::operator! ( const Pattern< TA > &  value)
inline

◆ operator!() [2/2]

TVM_TIRX_DLL PrimExpr tvm::operator! ( PrimExpr  a)

not

Parameters
aleft operand
Returns
The result expression.
Note
This operator does eager constant folding.

◆ operator!=() [1/5]

template<typename TA , typename TB >
PBinaryExpr< prim::NE, TA, TB > tvm::operator!= ( const Pattern< TA > &  a,
const Pattern< TB > &  b 
)
inline

◆ operator!=() [2/5]

template<typename TA >
PBinaryExpr< prim::NE, TA, PConstWithTypeLike< TA > > tvm::operator!= ( const Pattern< TA > &  a,
int64_t  b 
)
inline

◆ operator!=() [3/5]

bool tvm::operator!= ( const PrimType &  lhs,
const PrimType &  rhs 
)
inline

◆ operator!=() [4/5]

template<typename TA >
PBinaryExpr< prim::NE, PConstWithTypeLike< TA >, TA > tvm::operator!= ( int64_t  b,
const Pattern< TA > &  a 
)
inline

◆ operator!=() [5/5]

not_equal

Parameters
aleft operand
bright operand
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ operator%() [1/4]

template<typename TA , typename TB >
PBinaryExpr< prim::Mod, TA, TB > tvm::operator% ( const Pattern< TA > &  a,
const Pattern< TB > &  b 
)
inline

◆ operator%() [2/4]

template<typename TA >
PBinaryExpr< prim::Mod, TA, PConstWithTypeLike< TA > > tvm::operator% ( const Pattern< TA > &  a,
int64_t  b 
)
inline

◆ operator%() [3/4]

template<typename TB >
PrimExpr tvm::operator% ( const PrimExpr &  a,
const TB &  b 
)
inline

◆ operator%() [4/4]

template<typename TA >
PBinaryExpr< prim::Mod, PConstWithTypeLike< TA >, TA > tvm::operator% ( int64_t  b,
const Pattern< TA > &  a 
)
inline

◆ operator&() [1/4]

template<typename TA , typename TB >
PBinaryExpr< prim::BitwiseAnd, TA, TB, false > tvm::operator& ( const Pattern< TA > &  a,
const Pattern< TB > &  b 
)
inline

◆ operator&() [2/4]

PrimExpr tvm::operator& ( const PrimExpr &  a,
int  b 
)
inline

◆ operator&() [3/4]

PrimExpr tvm::operator& ( int  a,
const PrimExpr &  b 
)
inline

◆ operator&() [4/4]

TVM_TIRX_DLL PrimExpr tvm::operator& ( PrimExpr  a,
PrimExpr  b 
)

take bitwise and of two values

Parameters
aleft operand
bright operand
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ operator&&() [1/6]

PrimExpr tvm::operator&& ( bool  a,
const PrimExpr &  b 
)
inline

◆ operator&&() [2/6]

template<typename TA , typename TB >
PBinaryExpr< prim::And, TA, TB > tvm::operator&& ( const Pattern< TA > &  a,
const Pattern< TB > &  b 
)
inline

◆ operator&&() [3/6]

template<typename TA >
PBinaryExpr< prim::And, TA, PConstWithTypeLike< TA > > tvm::operator&& ( const Pattern< TA > &  a,
int64_t  b 
)
inline

◆ operator&&() [4/6]

PrimExpr tvm::operator&& ( const PrimExpr &  a,
bool  b 
)
inline

◆ operator&&() [5/6]

template<typename TA >
PBinaryExpr< prim::And, PConstWithTypeLike< TA >, TA > tvm::operator&& ( int64_t  b,
const Pattern< TA > &  a 
)
inline

◆ operator&&() [6/6]

TVM_TIRX_DLL PrimExpr tvm::operator&& ( PrimExpr  a,
PrimExpr  b 
)

and

Parameters
aleft operand
bright operand
Returns
The result expression.
Note
This operator does eager constant folding.

◆ operator*() [1/9]

template<typename TA , typename TB >
PBinaryExpr< prim::Mul, TA, TB > tvm::operator* ( const Pattern< TA > &  a,
const Pattern< TB > &  b 
)
inline

◆ operator*() [2/9]

template<typename TA >
PBinaryExpr< prim::Mul, TA, PConstWithTypeLike< TA > > tvm::operator* ( const Pattern< TA > &  a,
int64_t  b 
)
inline

◆ operator*() [3/9]

PrimExpr tvm::operator* ( const PrimExpr &  a,
double  b 
)
inline

◆ operator*() [4/9]

PrimExpr tvm::operator* ( const PrimExpr &  a,
float  b 
)
inline

◆ operator*() [5/9]

PrimExpr tvm::operator* ( const PrimExpr &  a,
int  b 
)
inline

◆ operator*() [6/9]

PrimExpr tvm::operator* ( float  a,
const PrimExpr &  b 
)
inline

◆ operator*() [7/9]

PrimExpr tvm::operator* ( int  a,
const PrimExpr &  b 
)
inline

◆ operator*() [8/9]

template<typename TA >
PBinaryExpr< prim::Mul, PConstWithTypeLike< TA >, TA > tvm::operator* ( int64_t  b,
const Pattern< TA > &  a 
)
inline

◆ operator*() [9/9]

TVM_TIRX_DLL PrimExpr tvm::operator* ( PrimExpr  a,
PrimExpr  b 
)

multiplication operator

Parameters
aleft operand
bright operand
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ operator*=()

PrimExpr tvm::operator*= ( PrimExpr &  a,
PrimExpr  b 
)
inline

Multiply an expression in place.

◆ operator+() [1/9]

template<typename TA , typename TB >
PBinaryExpr< prim::Add, TA, TB > tvm::operator+ ( const Pattern< TA > &  a,
const Pattern< TB > &  b 
)
inline

◆ operator+() [2/9]

template<typename TA >
PBinaryExpr< prim::Add, TA, PConstWithTypeLike< TA > > tvm::operator+ ( const Pattern< TA > &  a,
int64_t  b 
)
inline

◆ operator+() [3/9]

PrimExpr tvm::operator+ ( const PrimExpr &  a,
double  b 
)
inline

◆ operator+() [4/9]

PrimExpr tvm::operator+ ( const PrimExpr &  a,
float  b 
)
inline

◆ operator+() [5/9]

PrimExpr tvm::operator+ ( const PrimExpr &  a,
int  b 
)
inline

◆ operator+() [6/9]

PrimExpr tvm::operator+ ( float  a,
const PrimExpr &  b 
)
inline

◆ operator+() [7/9]

PrimExpr tvm::operator+ ( int  a,
const PrimExpr &  b 
)
inline

◆ operator+() [8/9]

template<typename TA >
PBinaryExpr< prim::Add, PConstWithTypeLike< TA >, TA > tvm::operator+ ( int64_t  b,
const Pattern< TA > &  a 
)
inline

◆ operator+() [9/9]

TVM_TIRX_DLL PrimExpr tvm::operator+ ( PrimExpr  a,
PrimExpr  b 
)

add operator

Parameters
aleft operand
bright operand
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ operator+=()

PrimExpr tvm::operator+= ( PrimExpr &  a,
PrimExpr  b 
)
inline

Add an expression in place.

◆ operator-() [1/10]

template<typename TA , typename TB >
PBinaryExpr< prim::Sub, TA, TB > tvm::operator- ( const Pattern< TA > &  a,
const Pattern< TB > &  b 
)
inline

◆ operator-() [2/10]

template<typename TA >
PBinaryExpr< prim::Sub, TA, PConstWithTypeLike< TA > > tvm::operator- ( const Pattern< TA > &  a,
int64_t  b 
)
inline

◆ operator-() [3/10]

PrimExpr tvm::operator- ( const PrimExpr &  a,
double  b 
)
inline

◆ operator-() [4/10]

PrimExpr tvm::operator- ( const PrimExpr &  a,
float  b 
)
inline

◆ operator-() [5/10]

PrimExpr tvm::operator- ( const PrimExpr &  a,
int  b 
)
inline

◆ operator-() [6/10]

PrimExpr tvm::operator- ( float  a,
const PrimExpr &  b 
)
inline

◆ operator-() [7/10]

PrimExpr tvm::operator- ( int  a,
const PrimExpr &  b 
)
inline

◆ operator-() [8/10]

template<typename TA >
PBinaryExpr< prim::Sub, PConstWithTypeLike< TA >, TA > tvm::operator- ( int64_t  b,
const Pattern< TA > &  a 
)
inline

◆ operator-() [9/10]

TVM_TIRX_DLL PrimExpr tvm::operator- ( PrimExpr  a)

negation.

Parameters
ainput.
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ operator-() [10/10]

TVM_TIRX_DLL PrimExpr tvm::operator- ( PrimExpr  a,
PrimExpr  b 
)

subtraction operator

Parameters
aleft operand
bright operand
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ operator-=()

PrimExpr tvm::operator-= ( PrimExpr &  a,
PrimExpr  b 
)
inline

Subtract an expression in place.

◆ operator/() [1/5]

template<typename TA , typename TB >
PBinaryExpr< prim::Div, TA, TB > tvm::operator/ ( const Pattern< TA > &  a,
const Pattern< TB > &  b 
)
inline

◆ operator/() [2/5]

template<typename TA >
PBinaryExpr< prim::Div, TA, PConstWithTypeLike< TA > > tvm::operator/ ( const Pattern< TA > &  a,
int64_t  b 
)
inline

◆ operator/() [3/5]

template<typename TB >
PrimExpr tvm::operator/ ( const PrimExpr &  a,
const TB &  b 
)
inline

◆ operator/() [4/5]

template<typename TA >
PBinaryExpr< prim::Div, PConstWithTypeLike< TA >, TA > tvm::operator/ ( int64_t  b,
const Pattern< TA > &  a 
)
inline

◆ operator/() [5/5]

TVM_TIRX_DLL PrimExpr tvm::operator/ ( PrimExpr  a,
PrimExpr  b 
)

division operator

Parameters
aleft operand
bright operand
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ operator/=()

template<typename TB >
PrimExpr tvm::operator/= ( const PrimExpr &  a,
const TB &  b 
)
inline

◆ operator<() [1/9]

template<typename TA , typename TB >
PBinaryExpr< prim::LT, TA, TB > tvm::operator< ( const Pattern< TA > &  a,
const Pattern< TB > &  b 
)
inline

◆ operator<() [2/9]

template<typename TA >
PBinaryExpr< prim::LT, TA, PConstWithTypeLike< TA > > tvm::operator< ( const Pattern< TA > &  a,
int64_t  b 
)
inline

◆ operator<() [3/9]

PrimExpr tvm::operator< ( const PrimExpr &  a,
double  b 
)
inline

◆ operator<() [4/9]

PrimExpr tvm::operator< ( const PrimExpr &  a,
float  b 
)
inline

◆ operator<() [5/9]

PrimExpr tvm::operator< ( const PrimExpr &  a,
int  b 
)
inline

◆ operator<() [6/9]

PrimExpr tvm::operator< ( float  a,
const PrimExpr &  b 
)
inline

◆ operator<() [7/9]

PrimExpr tvm::operator< ( int  a,
const PrimExpr &  b 
)
inline

◆ operator<() [8/9]

template<typename TA >
PBinaryExpr< prim::LT, PConstWithTypeLike< TA >, TA > tvm::operator< ( int64_t  b,
const Pattern< TA > &  a 
)
inline

◆ operator<() [9/9]

TVM_TIRX_DLL PrimExpr tvm::operator< ( PrimExpr  a,
PrimExpr  b 
)

less

Parameters
aleft operand
bright operand
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ operator<<() [1/6]

template<typename TA , typename TB >
PBinaryExpr< prim::LShift, TA, TB, false > tvm::operator<< ( const Pattern< TA > &  a,
const Pattern< TB > &  b 
)
inline

◆ operator<<() [2/6]

PrimExpr tvm::operator<< ( const PrimExpr &  a,
int  b 
)
inline

◆ operator<<() [3/6]

PrimExpr tvm::operator<< ( int  a,
const PrimExpr &  b 
)
inline

◆ operator<<() [4/6]

TVM_TIRX_DLL PrimExpr tvm::operator<< ( PrimExpr  a,
PrimExpr  b 
)

left shift operator

Parameters
aleft operand
bright operand
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ operator<<() [5/6]

std::ostream & tvm::operator<< ( std::ostream &  os,
CallEffectKind  side_effect 
)
inline

◆ operator<<() [6/6]

TVM_TIRX_DLL std::ostream & tvm::operator<< ( std::ostream &  os,
ForKind  kind 
)

◆ operator<=() [1/9]

template<typename TA , typename TB >
PBinaryExpr< prim::LE, TA, TB > tvm::operator<= ( const Pattern< TA > &  a,
const Pattern< TB > &  b 
)
inline

◆ operator<=() [2/9]

template<typename TA >
PBinaryExpr< prim::LE, TA, PConstWithTypeLike< TA > > tvm::operator<= ( const Pattern< TA > &  a,
int64_t  b 
)
inline

◆ operator<=() [3/9]

PrimExpr tvm::operator<= ( const PrimExpr &  a,
double  b 
)
inline

◆ operator<=() [4/9]

PrimExpr tvm::operator<= ( const PrimExpr &  a,
float  b 
)
inline

◆ operator<=() [5/9]

PrimExpr tvm::operator<= ( const PrimExpr &  a,
int  b 
)
inline

◆ operator<=() [6/9]

PrimExpr tvm::operator<= ( float  a,
const PrimExpr &  b 
)
inline

◆ operator<=() [7/9]

PrimExpr tvm::operator<= ( int  a,
const PrimExpr &  b 
)
inline

◆ operator<=() [8/9]

template<typename TA >
PBinaryExpr< prim::LE, PConstWithTypeLike< TA >, TA > tvm::operator<= ( int64_t  b,
const Pattern< TA > &  a 
)
inline

◆ operator<=() [9/9]

TVM_TIRX_DLL PrimExpr tvm::operator<= ( PrimExpr  a,
PrimExpr  b 
)

less_equal

Parameters
aleft operand
bright operand
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ operator==() [1/5]

template<typename TA , typename TB >
PBinaryExpr< prim::EQ, TA, TB > tvm::operator== ( const Pattern< TA > &  a,
const Pattern< TB > &  b 
)
inline

◆ operator==() [2/5]

template<typename TA >
PBinaryExpr< prim::EQ, TA, PConstWithTypeLike< TA > > tvm::operator== ( const Pattern< TA > &  a,
int64_t  b 
)
inline

◆ operator==() [3/5]

bool tvm::operator== ( const PrimType &  lhs,
const PrimType &  rhs 
)
inline

◆ operator==() [4/5]

template<typename TA >
PBinaryExpr< prim::EQ, PConstWithTypeLike< TA >, TA > tvm::operator== ( int64_t  b,
const Pattern< TA > &  a 
)
inline

◆ operator==() [5/5]

TVM_TIRX_DLL PrimExpr tvm::operator== ( PrimExpr  a,
PrimExpr  b 
)

equal

Parameters
aleft operand
bright operand
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ operator>() [1/9]

template<typename TA , typename TB >
PBinaryExpr< prim::GT, TA, TB > tvm::operator> ( const Pattern< TA > &  a,
const Pattern< TB > &  b 
)
inline

◆ operator>() [2/9]

template<typename TA >
PBinaryExpr< prim::GT, TA, PConstWithTypeLike< TA > > tvm::operator> ( const Pattern< TA > &  a,
int64_t  b 
)
inline

◆ operator>() [3/9]

PrimExpr tvm::operator> ( const PrimExpr &  a,
double  b 
)
inline

◆ operator>() [4/9]

PrimExpr tvm::operator> ( const PrimExpr &  a,
float  b 
)
inline

◆ operator>() [5/9]

PrimExpr tvm::operator> ( const PrimExpr &  a,
int  b 
)
inline

◆ operator>() [6/9]

PrimExpr tvm::operator> ( float  a,
const PrimExpr &  b 
)
inline

◆ operator>() [7/9]

PrimExpr tvm::operator> ( int  a,
const PrimExpr &  b 
)
inline

◆ operator>() [8/9]

template<typename TA >
PBinaryExpr< prim::GT, PConstWithTypeLike< TA >, TA > tvm::operator> ( int64_t  b,
const Pattern< TA > &  a 
)
inline

◆ operator>() [9/9]

TVM_TIRX_DLL PrimExpr tvm::operator> ( PrimExpr  a,
PrimExpr  b 
)

greater

Parameters
aleft operand
bright operand
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ operator>=() [1/9]

template<typename TA , typename TB >
PBinaryExpr< prim::GE, TA, TB > tvm::operator>= ( const Pattern< TA > &  a,
const Pattern< TB > &  b 
)
inline

◆ operator>=() [2/9]

template<typename TA >
PBinaryExpr< prim::GE, TA, PConstWithTypeLike< TA > > tvm::operator>= ( const Pattern< TA > &  a,
int64_t  b 
)
inline

◆ operator>=() [3/9]

PrimExpr tvm::operator>= ( const PrimExpr &  a,
double  b 
)
inline

◆ operator>=() [4/9]

PrimExpr tvm::operator>= ( const PrimExpr &  a,
float  b 
)
inline

◆ operator>=() [5/9]

PrimExpr tvm::operator>= ( const PrimExpr &  a,
int  b 
)
inline

◆ operator>=() [6/9]

PrimExpr tvm::operator>= ( float  a,
const PrimExpr &  b 
)
inline

◆ operator>=() [7/9]

PrimExpr tvm::operator>= ( int  a,
const PrimExpr &  b 
)
inline

◆ operator>=() [8/9]

template<typename TA >
PBinaryExpr< prim::GE, PConstWithTypeLike< TA >, TA > tvm::operator>= ( int64_t  b,
const Pattern< TA > &  a 
)
inline

◆ operator>=() [9/9]

TVM_TIRX_DLL PrimExpr tvm::operator>= ( PrimExpr  a,
PrimExpr  b 
)

greater_equal

Parameters
aleft operand
bright operand
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ operator>>() [1/4]

template<typename TA , typename TB >
PBinaryExpr< prim::RShift, TA, TB, false > tvm::operator>> ( const Pattern< TA > &  a,
const Pattern< TB > &  b 
)
inline

◆ operator>>() [2/4]

PrimExpr tvm::operator>> ( const PrimExpr &  a,
int  b 
)
inline

◆ operator>>() [3/4]

PrimExpr tvm::operator>> ( int  a,
const PrimExpr &  b 
)
inline

◆ operator>>() [4/4]

TVM_TIRX_DLL PrimExpr tvm::operator>> ( PrimExpr  a,
PrimExpr  b 
)

right shift operator

Parameters
aleft operand
bright operand
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ operator^() [1/4]

template<typename TA , typename TB >
PBinaryExpr< prim::BitwiseXor, TA, TB, false > tvm::operator^ ( const Pattern< TA > &  a,
const Pattern< TB > &  b 
)
inline

◆ operator^() [2/4]

PrimExpr tvm::operator^ ( const PrimExpr &  a,
int  b 
)
inline

◆ operator^() [3/4]

PrimExpr tvm::operator^ ( int  a,
const PrimExpr &  b 
)
inline

◆ operator^() [4/4]

TVM_TIRX_DLL PrimExpr tvm::operator^ ( PrimExpr  a,
PrimExpr  b 
)

take bitwise xor of two values

Parameters
aleft operand
bright operand
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ operator|() [1/4]

template<typename TA , typename TB >
PBinaryExpr< prim::BitwiseOr, TA, TB, false > tvm::operator| ( const Pattern< TA > &  a,
const Pattern< TB > &  b 
)
inline

◆ operator|() [2/4]

PrimExpr tvm::operator| ( const PrimExpr &  a,
int  b 
)
inline

◆ operator|() [3/4]

PrimExpr tvm::operator| ( int  a,
const PrimExpr &  b 
)
inline

◆ operator|() [4/4]

TVM_TIRX_DLL PrimExpr tvm::operator| ( PrimExpr  a,
PrimExpr  b 
)

take bitwise or of two values

Parameters
aleft operand
bright operand
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ operator||() [1/6]

PrimExpr tvm::operator|| ( bool  a,
const PrimExpr &  b 
)
inline

◆ operator||() [2/6]

template<typename TA , typename TB >
PBinaryExpr< prim::Or, TA, TB > tvm::operator|| ( const Pattern< TA > &  a,
const Pattern< TB > &  b 
)
inline

◆ operator||() [3/6]

template<typename TA >
PBinaryExpr< prim::Or, TA, PConstWithTypeLike< TA > > tvm::operator|| ( const Pattern< TA > &  a,
int64_t  b 
)
inline

◆ operator||() [4/6]

PrimExpr tvm::operator|| ( const PrimExpr &  a,
bool  b 
)
inline

◆ operator||() [5/6]

template<typename TA >
PBinaryExpr< prim::Or, PConstWithTypeLike< TA >, TA > tvm::operator|| ( int64_t  b,
const Pattern< TA > &  a 
)
inline

◆ operator||() [6/6]

TVM_TIRX_DLL PrimExpr tvm::operator|| ( PrimExpr  a,
PrimExpr  b 
)

or

Parameters
aleft operand
bright operand
Returns
The result expression.
Note
This operator does eager constant folding.

◆ operator~() [1/2]

template<typename TA >
PBitwiseNotExpr< TA > tvm::operator~ ( const Pattern< TA > &  value)
inline

◆ operator~() [2/2]

TVM_TIRX_DLL PrimExpr tvm::operator~ ( PrimExpr  a)

take bitwise negation of two values

Parameters
athe input expression.
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ ramp() [1/2]

template<typename TBase , typename TStride , typename TLanes >
PRampExpr< TBase, TStride, TLanes > tvm::ramp ( const Pattern< TBase > &  base,
const Pattern< TStride > &  stride,
const Pattern< TLanes > &  lanes 
)
inline

Construct a ramp pattern.

Parameters
baseThe base pattern.
strideThe stride pattern.
lanesThe lanes pattern.
Returns
The result pattern.
Template Parameters
TBaseThe pattern type of the base.
TStrideThe pattern type of the stride.
TLanesThe pattern type of the lanes.

◆ ramp() [2/2]

template<typename TBase >
PRampExpr< TBase, PConstWithTypeLike< TBase >, PConstWithTypeLike< TBase > > tvm::ramp ( const Pattern< TBase > &  base,
int  stride,
int  lanes 
)
inline

◆ right_shift() [1/3]

PrimExpr tvm::right_shift ( const PrimExpr &  a,
int  b,
Location  loc = UnknownLoc() 
)
inline

◆ right_shift() [2/3]

PrimExpr tvm::right_shift ( int  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ right_shift() [3/3]

TVM_TIRX_DLL PrimExpr tvm::right_shift ( PrimExpr  a,
PrimExpr  b,
Location  loc = UnknownLoc() 
)

right shift operator

Parameters
aleft operand
bright operand
locThe location of this operation in the source.
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ Script()

TVM_TIRX_DLL ffi::String tvm::Script ( const ffi::ObjectRef &  node,
const ffi::Optional< PrinterConfig > &  config = std::nullopt 
)

Print an IR object as TVMScript, using repr when no translation hook exists.

Parameters
nodeThe input IR object.
configOptional translation and rendering configuration.
Returns
The rendered script or fallback representation.

◆ select()

template<typename TCond , typename TA , typename TB >
PSelectExpr< TCond, TA, TB > tvm::select ( const Pattern< TCond > &  condition,
const Pattern< TA > &  true_value,
const Pattern< TB > &  false_value 
)
inline

Construct a select pattern.

Parameters
conditionThe condition expression.
true_valueThe value when condition is true.
false_valueThe value when condition is false.
Returns
The result pattern.
Template Parameters
TCondThe pattern type of the condition.
TAThe pattern type of the true operand.
TBThe pattern type of the false operand.

◆ shapediv()

TVM_TIRX_DLL PrimExpr tvm::shapediv ( PrimExpr  a,
PrimExpr  b,
Location  loc = UnknownLoc() 
)

compute ceil(a / b) where a and b are non-negative.

Use this function for shape split calculation.

This function might take advantage of the fact that a and b are non-negative.

Parameters
aleft operand
bright operand
locThe location of this operation in the source.
Returns
The result expression.
Note
this function does eager constant folding for shape types(int32, int64) when possible.

◆ SideEffect()

TVM_TIRX_DLL CallEffectKind tvm::SideEffect ( const Expr &  expr)

Analyze the runtime effects of an expression.

Accumulates effects of evaluated expression children, excluding type and vector lane-count metadata. Non-operator callees are conservatively opaque. Missing operator effect attributes are errors unless an earlier update effect stops traversal. Returns kPure, kReadState, or kUpdateState.

Shared IR contains only minimal analyses of expression properties. Arithmetic reasoning, constraint solving, and target- or dialect-specific analyses belong in their respective modules.

Parameters
exprThe expression to inspect.
Returns
The strongest runtime effect of the expression.

◆ sub() [1/6]

PrimExpr tvm::sub ( const PrimExpr &  a,
double  b,
Location  loc = UnknownLoc() 
)
inline

◆ sub() [2/6]

PrimExpr tvm::sub ( const PrimExpr &  a,
float  b,
Location  loc = UnknownLoc() 
)
inline

◆ sub() [3/6]

PrimExpr tvm::sub ( const PrimExpr &  a,
int  b,
Location  loc = UnknownLoc() 
)
inline

◆ sub() [4/6]

PrimExpr tvm::sub ( float  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ sub() [5/6]

PrimExpr tvm::sub ( int  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ sub() [6/6]

TVM_TIRX_DLL PrimExpr tvm::sub ( PrimExpr  a,
PrimExpr  b,
Location  loc = UnknownLoc() 
)

subtraction operator

Parameters
aleft operand
bright operand
locThe location of this operation in the source.
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ truncdiv() [1/6]

template<typename TA , typename TB >
PBinaryExpr< prim::Div, TA, TB > tvm::truncdiv ( const Pattern< TA > &  a,
const Pattern< TB > &  b 
)
inline

◆ truncdiv() [2/6]

template<typename TA >
PBinaryExpr< prim::Div, TA, PConstWithTypeLike< TA > > tvm::truncdiv ( const Pattern< TA > &  a,
int64_t  b 
)
inline

◆ truncdiv() [3/6]

PrimExpr tvm::truncdiv ( const PrimExpr &  a,
int  b,
Location  loc = UnknownLoc() 
)
inline

◆ truncdiv() [4/6]

PrimExpr tvm::truncdiv ( int  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ truncdiv() [5/6]

template<typename TA >
PBinaryExpr< prim::Div, PConstWithTypeLike< TA >, TA > tvm::truncdiv ( int64_t  b,
const Pattern< TA > &  a 
)
inline

◆ truncdiv() [6/6]

TVM_TIRX_DLL PrimExpr tvm::truncdiv ( PrimExpr  a,
PrimExpr  b,
Location  loc = UnknownLoc() 
)

compute trunc(a / b)

This is the default integer division behavior in C.

Parameters
aleft operand
bright operand
locThe location of this operation in the source.
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ truncmod() [1/6]

template<typename TA , typename TB >
PBinaryExpr< prim::Mod, TA, TB > tvm::truncmod ( const Pattern< TA > &  a,
const Pattern< TB > &  b 
)
inline

◆ truncmod() [2/6]

template<typename TA >
PBinaryExpr< prim::Mod, TA, PConstWithTypeLike< TA > > tvm::truncmod ( const Pattern< TA > &  a,
int64_t  b 
)
inline

◆ truncmod() [3/6]

PrimExpr tvm::truncmod ( const PrimExpr &  a,
int  b,
Location  loc = UnknownLoc() 
)
inline

◆ truncmod() [4/6]

PrimExpr tvm::truncmod ( int  a,
const PrimExpr &  b,
Location  loc = UnknownLoc() 
)
inline

◆ truncmod() [5/6]

template<typename TA >
PBinaryExpr< prim::Mod, PConstWithTypeLike< TA >, TA > tvm::truncmod ( int64_t  b,
const Pattern< TA > &  a 
)
inline

◆ truncmod() [6/6]

TVM_TIRX_DLL PrimExpr tvm::truncmod ( PrimExpr  a,
PrimExpr  b,
Location  loc = UnknownLoc() 
)

compute the remainder of truncdiv

This is the default integer division behavior in C.

Parameters
aleft operand
bright operand
locThe location of this operation in the source.
Returns
The result expression.
Note
this function does eager constant folding for index types(int32, int64) when possible.

◆ UndefinedVars()

ffi::Array< Var > tvm::UndefinedVars ( ffi::AnyView  object,
const ffi::Array< Var > &  defs = {} 
)
inline

Find variable uses without a preceding definition in well-formed IR.

Definitions follow the structural definition-site metadata. Variable types are traversed at definitions, while variable uses are leaves. Scope and duplicate-definition validation belong to the IR verifier.

Parameters
objectThe IR object to visit.
defsVariables already defined outside the object.
Returns
Undefined variables, uniquely ordered by their first use.

◆ VoidType()

Type tvm::VoidType ( )
inline
Returns
a type that represents void.

◆ WithAttr() [1/2]

template<typename TFunc >
TFunc tvm::WithAttr ( TFunc  input,
const std::string &  attr_key,
Any  attr_value 
)
inline

Copy the function or module, but overrides the attribute value key with the value.

Parameters
inputThe thing to annotate (BaseFunc or IRModule)
attr_keyThe attribute key.
attr_valueThe value attribute value.
Template Parameters
TFuncThe corresponding function or module type, including BaseFunc. Shared inputs must register a reflected shallow-copy constructor.
Returns
The new function or module with updated attributes.
Note
This function performs copy on write optimization for func and module. If we move a uniquely referenced func or module into WithAttr, then no additional copy will be performed.

This is also why we make it as a function instead of a member function and why we pass by value in the first argument.

// Recommended way to trigger copy on write
func = WithAttr(std::move(func), "key1", value1);
func = WithAttr(std::move(func), "key2", value2);
TFunc WithAttr(TFunc input, const std::string &attr_key, Any attr_value)
Copy the function or module, but overrides the attribute value key with the value.
Definition attrs.h:271

◆ WithAttr() [2/2]

template<typename TFunc , typename T , typename Value , std::enable_if_t<(std::is_convertible_v< Value &&, T > &&((!std::is_same_v< std::decay_t< Value >, ffi::Any > &&!std::is_same_v< std::decay_t< Value >, ffi::AnyView >)||std::is_same_v< T, ffi::Any >||std::is_same_v< T, ffi::AnyView >)), int > = 0>
TFunc tvm::WithAttr ( TFunc  input,
ffi::reflection::AttrKey< T >  key,
Value &&  value 
)
inline

Attach a typed value using the existing function or module copy-on-write path.

◆ WithAttrs()

template<typename TFunc >
TFunc tvm::WithAttrs ( TFunc  input,
ffi::Map< ffi::String, Any >  attrs 
)
inline

Copy the function or module, but overrides the attributes with the entries from attrs.

Parameters
inputThe thing to annotate (BaseFunc or IRModule)
attrsKey/values attributes to add to input.
Template Parameters
TFuncThe corresponding function or module type, including BaseFunc. Shared inputs must register a reflected shallow-copy constructor.
Returns
The new function or module with updated attributes.

◆ WithoutAttr() [1/2]

template<typename TFunc >
TFunc tvm::WithoutAttr ( TFunc  input,
const std::string &  attr_key 
)
inline

Copy the function or module, but removes the specified attribute.

Parameters
inputThe thing to annotate (BaseFunc or IRModule)
attr_keyThe attribute key.
Template Parameters
TFuncThe corresponding function or module type, including BaseFunc. Shared inputs must register a reflected shallow-copy constructor.
Returns
The new function or module with removed attribute.
Note
This function performs copy on write optimization for func and module. If we move a uniquely referenced func or module into WithoutAttr, then no additional copy will be performed.

This is also why we make it as a function instead of a member function and why we pass by value in the first argument.

// Recommended way to trigger copy on write
func = WithoutAttr(std::move(func), "key1");
func = WithoutAttr(std::move(func), "key2");
TFunc WithoutAttr(TFunc input, const std::string &attr_key)
Copy the function or module, but removes the specified attribute.
Definition attrs.h:373

◆ WithoutAttr() [2/2]

template<typename TFunc , typename T >
TFunc tvm::WithoutAttr ( TFunc  input,
ffi::reflection::AttrKey< T >  key 
)
inline

Remove a typed attribute using the existing copy-on-write path.