tvm
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
tvm Namespace Reference

Performance counters for profiling via the PAPI library. More...

Namespaces

 arith
 namespace of arithmetic analysis.
 
 attr
 Generic attribute names that can be attached to any function.
 
 codegen
 namespace for target translation and codegen.
 
 detail
 
 instrument
 
 ir
 
 meta_schedule
 
 relax
 
 runtime
 
 script
 
 support
 
 te
 Tensor expression language DSL.
 
 tir
 
 topi
 
 transform
 

Classes

struct  AttrError
 Error thrown during attribute checking. More...
 
class  AttrFieldInfoNode
 Information about attribute fields in string representations. More...
 
class  AttrFieldInfo
 AttrFieldInfo. More...
 
class  BaseAttrsNode
 Base class of all attribute class. More...
 
class  Attrs
 Managed reference to BaseAttrsNode. More...
 
class  DictAttrsNode
 Specialized attribute type that is backed by a map. The DictAttrsNode implements the Attrs behavior, its fields are directly accessible via object.field_name like other normal nodes. More...
 
class  DictAttrs
 Managed reference to DictAttrsNode. More...
 
class  AttrsNode
 The base class of the all the Use "curiously recurring template pattern". More...
 
class  DiagnosticNode
 A compiler diagnostic message. More...
 
class  Diagnostic
 
class  DiagnosticBuilder
 A wrapper around std::stringstream to build a diagnostic. More...
 
class  DiagnosticRendererNode
 Display diagnostics in a given display format. More...
 
class  DiagnosticRenderer
 
class  DiagnosticContextNode
 
class  DiagnosticContext
 
class  EnvFuncNode
 A serializable function backed by TVM's global environment. More...
 
class  EnvFunc
 Managed reference to EnvFuncNode. More...
 
class  TypedEnvFunc
 Please refer to TypedEnvFunc<R(Args..)>. More...
 
class  TypedEnvFunc< R(Args...)>
 A typed version of EnvFunc. It is backed by a GlobalFuncNode internally. More...
 
class  BaseExprNode
 Base type of all the expressions. More...
 
class  BaseExpr
 Managed reference to BaseExprNode. More...
 
class  PrimExprNode
 Base node of all primitive expressions. More...
 
class  PrimExpr
 Reference to PrimExprNode. More...
 
class  RelaxExprNode
 Base node of all non-primitive expressions. More...
 
class  RelaxExpr
 Managed reference to RelaxExprNode. More...
 
class  GlobalVarNode
 Global variable that lives in the top-level module. More...
 
class  GlobalVar
 Managed reference to GlobalVarNode. More...
 
class  IntImmNode
 Constant integer literals in the program. More...
 
class  IntImm
 Managed reference class to IntImmNode. More...
 
class  FloatImmNode
 Constant floating point literals in the program. More...
 
class  FloatImm
 Managed reference class to FloatImmNode. More...
 
class  Bool
 Boolean constant. More...
 
class  Integer
 Container of constant int that adds more constructors. More...
 
class  RangeNode
 range over one dimension More...
 
class  Range
 Range container
More...
 
class  BaseFuncNode
 Base node of all functions. More...
 
class  BaseFunc
 Managed reference to BaseFuncNode. More...
 
class  GlobalInfoNode
 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  GlobalInfo
 Managed reference to GlobalInfoNode. More...
 
class  VDeviceNode
 A global info subclass for virtual devices. More...
 
class  VDevice
 Managed reference to VDeviceNode. More...
 
class  DummyGlobalInfoNode
 A dummy global info sub-class for testing purpose. More...
 
class  DummyGlobalInfo
 Managed reference to DummyGlobalInfoNode. More...
 
class  GlobalVarSupplyNode
 GlobalVarSupply can be used to generate unique GlobalVars. More...
 
class  GlobalVarSupply
 Managed reference class to GlobalVarSupplyNode. More...
 
class  IRModuleNode
 IRModule that holds functions and type definitions. More...
 
class  IRModule
 Managed reference class to IRModuleNode. More...
 
class  NameSupplyNode
 NameSupply can be used to generate unique names. More...
 
class  NameSupply
 Managed reference class to NameSupplyNode. More...
 
class  OpAttrMap
 Map<Op,ValueType> used to store meta-information about Op. More...
 
class  OpNode
 Primitive Op(builtin intrinsics) More...
 
class  Op
 Managed reference class to OpNode. More...
 
class  OpRegEntry
 Helper structure to register operators. More...
 
class  SourceNameNode
 The name of a source fragment. More...
 
class  SourceName
 The source name of a file span. More...
 
class  SpanNode
 Stores locations in frontend source that generated a node. More...
 
class  Span
 
class  SequentialSpanNode
 Store a list of spans for an expr generated from mulitple source exprs. More...
 
class  SequentialSpan
 Reference class of SequentialSpanNode. More...
 
class  SourceNode
 
class  Source
 
class  SourceMapNode
 Stores locations in frontend source that generated a node. More...
 
class  SourceMap
 
class  TypeNode
 Type is the base type of all types. More...
 
class  Type
 Managed reference to TypeNode. More...
 
class  PrimTypeNode
 Primitive data types used in the low-level IR. More...
 
class  PrimType
 
class  PointerTypeNode
 Low-level raw pointer type. More...
 
class  PointerType
 
class  TupleTypeNode
 The type of tuple values. More...
 
class  TupleType
 Managed reference to TupleTypeNode. More...
 
class  FuncTypeNode
 Function type. More...
 
class  FuncType
 Managed reference to FuncTypeNode. More...
 
class  TypeFunctor
 
class  TypeFunctor< R(const Type &n, Args...)>
 
class  TypeVisitor
 A type visitor that recursively visit types. More...
 
class  TypeMutator
 TypeMutator that mutates expressions. More...
 
class  AttrRegistryMapContainerMap
 Generic attribute map. More...
 
class  AttrRegistryMap
 Map<Key, ValueType> used to store meta-data. More...
 
class  NodeFunctor
 A dynamically dispatched functor on the type of the first argument. More...
 
class  NodeFunctor< R(const ObjectRef &n, Args...)>
 
class  ObjectPathNode
 Path to an object from some root object. More...
 
class  ObjectPath
 
class  RootPathNode
 
class  RootPath
 
class  AttributeAccessPathNode
 
class  AttributeAccessPath
 
class  UnknownAttributeAccessPathNode
 
class  UnknownAttributeAccessPath
 
class  ArrayIndexPathNode
 
class  ArrayIndexPath
 
class  MissingArrayElementPathNode
 
class  MissingArrayElementPath
 
class  MapValuePathNode
 
class  MapValuePath
 
class  MissingMapEntryPathNode
 
class  MissingMapEntryPath
 
class  AttrVisitor
 Visitor class to get the attributes of an AST/IR node. The content is going to be called for each field. More...
 
class  ReflectionVTable
 Virtual function table to support IR/AST node reflection. More...
 
class  ReprPrinter
 A printer class to print the AST/IR nodes. More...
 
class  ReprLegacyPrinter
 Legacy behavior of ReprPrinter. More...
 
class  PrinterConfigNode
 
class  PrinterConfig
 
class  TVMScriptPrinter
 Legacy behavior of ReprPrinter. More...
 
class  BaseValueEqual
 Equality definition of base value class. More...
 
class  ObjectPathPairNode
 Pair of ObjectPaths, one for each object being tested for structural equality. More...
 
class  ObjectPathPair
 
class  StructuralEqual
 Content-aware structural equality comparator for objects. More...
 
class  SEqualReducer
 A Reducer class to reduce the structural equality result of two objects. More...
 
class  SEqualHandlerDefault
 The default handler for equality testing. More...
 
class  BaseValueHash
 Hash definition of base value classes. More...
 
class  StructuralHash
 Content-aware structural hashing. More...
 
class  SHashReducer
 A Reducer class to reduce the structural hash value. More...
 
class  SHashHandlerDefault
 The default handler for hash key computation. More...
 
struct  NDArrayContainerTrait
 
class  With
 RAII wrapper function to enter and exit a context object similar to python's with syntax. More...
 
class  TargetTagNode
 A target tag. More...
 
class  TargetTag
 Managed reference class to TargetTagNode. More...
 
class  TargetTagRegEntry
 
class  TargetNode
 Compilation target. More...
 
class  Target
 Managed reference class to TargetNode. More...
 
class  MemoryInfoNode
 Memory information of special memory region. Use MemoryInfo as its container type. More...
 
class  MemoryInfo
 Defines memory info. More...
 
class  TargetKindAttrMap
 Map<TargetKind, ValueType> used to store meta-information about TargetKind. More...
 
class  TargetKindNode
 Target kind, specifies the kind of the target. More...
 
class  TargetKind
 Managed reference class to TargetKindNode. More...
 
class  TargetKindRegEntry
 Helper structure to register TargetKind. More...
 
class  VirtualDeviceNode
 Describes at compile time the constraints on where data is to be stored at runtime down to the (virtual) device and memory scope level, and how to compile code to compute that data. Used by the PlanDevices pass to collect and solve (virtual) device constraints for the whole Relax program. More...
 
class  VirtualDevice
 Managed reference class to VirtualDeviceNode. More...
 
class  VirtualDeviceCache
 A cache of VirtualDevices. This can be used: More...
 
class  AttrRegistry
 

Typedefs

using MemoryScope = String
 Abstract label for an area of memory. More...
 
using DataType = runtime::DataType
 
using Device = DLDevice
 
using TargetFeatures = Map< String, ObjectRef >
 Map containing parsed features of a specific Target. More...
 
using TargetJSON = Map< String, ObjectRef >
 TargetParser to apply on instantiation of a given TargetKind. More...
 
using FTVMTargetParser = runtime::TypedPackedFunc< TargetJSON(TargetJSON)>
 

Enumerations

enum class  DiagnosticLevel : int {
  kBug = 10 , kError = 20 , kWarning = 30 , kNote = 40 ,
  kHelp = 50
}
 The diagnostic level, controls the printing of the message. 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...
 

Functions

template<typename TObjectRef >
TObjectRef NullValue ()
 Create a NodeRef type that represents null. More...
 
template<>
DataType NullValue< DataType > ()
 
template<typename TAttrs >
TAttrs AttrsWithDefaultValues ()
 Create an Attr object with all default values. More...
 
DictAttrs WithAttrs (DictAttrs attrs, Map< String, ObjectRef > new_attrs)
 Copy the DictAttrs, but overrides attributes with the entries from attrs. More...
 
DictAttrs WithAttr (DictAttrs attrs, String key, ObjectRef value)
 Copy the DictAttrs, but overrides a single attribute. More...
 
DictAttrs WithAttr (DictAttrs attrs, const std::string &key, ObjectRef value)
 
DictAttrs WithoutAttr (DictAttrs attrs, const std::string &key)
 Copy the DictAttrs, but without a specific attribute. More...
 
template<typename TFunc >
TFunc WithAttr (TFunc input, const std::string &attr_key, ObjectRef attr_value)
 Copy the function or module, but overrides the attribute value key with the value. More...
 
template<typename TFunc >
TFunc WithAttrs (TFunc input, Map< String, ObjectRef > attrs)
 Copy the function or module, but overrides the attributes with the entries from attrs. More...
 
template<typename TFunc >
TFunc WithoutAttr (TFunc input, const std::string &attr_key)
 Copy the function or module, but removes the specified attribute. More...
 
DiagnosticRenderer TerminalRenderer (std::ostream &ostream)
 
PrimExpr operator+ (PrimExpr a, PrimExpr b)
 add operator More...
 
PrimExpr operator- (PrimExpr a, PrimExpr b)
 subtraction operator More...
 
PrimExpr operator- (PrimExpr a)
 negation. More...
 
PrimExpr operator* (PrimExpr a, PrimExpr b)
 multiplication operator More...
 
PrimExpr operator/ (PrimExpr a, PrimExpr b)
 division operator More...
 
PrimExpr operator<< (PrimExpr a, PrimExpr b)
 left shift operator More...
 
PrimExpr operator>> (PrimExpr a, PrimExpr b)
 right shift operator More...
 
PrimExpr operator> (PrimExpr a, PrimExpr b)
 greater More...
 
PrimExpr operator>= (PrimExpr a, PrimExpr b)
 greater_equal More...
 
PrimExpr operator< (PrimExpr a, PrimExpr b)
 less More...
 
PrimExpr operator<= (PrimExpr a, PrimExpr b)
 less_equal More...
 
PrimExpr operator== (PrimExpr a, PrimExpr b)
 equal More...
 
PrimExpr operator!= (PrimExpr a, PrimExpr b)
 not_equal More...
 
PrimExpr operator&& (PrimExpr a, PrimExpr b)
 and More...
 
PrimExpr operator|| (PrimExpr a, PrimExpr b)
 or More...
 
PrimExpr operator! (PrimExpr a)
 not More...
 
PrimExpr operator& (PrimExpr a, PrimExpr b)
 take bitwise and of two values More...
 
PrimExpr operator| (PrimExpr a, PrimExpr b)
 take bitwise or of two values More...
 
PrimExpr operator^ (PrimExpr a, PrimExpr b)
 take bitwise xor of two values More...
 
PrimExpr operator~ (PrimExpr a)
 take bitwise negation of two values More...
 
Bool operator|| (const Bool &a, bool b)
 
Bool operator|| (bool a, const Bool &b)
 
Bool operator|| (const Bool &a, const Bool &b)
 
Bool operator&& (const Bool &a, bool b)
 
Bool operator&& (bool a, const Bool &b)
 
Bool operator&& (const Bool &a, const Bool &b)
 
bool operator== (const Bool &a, bool b)
 
bool operator== (bool a, const Bool &b)
 
bool operator== (const Bool &a, const Bool &b)
 
Type VoidType ()
 
bool IsVoidType (const Type &type)
 Check whether the tyep represents void. More...
 
Optional< StringGetAttrKeyByAddress (const Object *object, const void *attr_address)
 Given an object and an address of its attribute, return the key of the attribute. More...
 
void Dump (const runtime::ObjectRef &node)
 Dump the node to stderr, used for debug purposes. More...
 
void Dump (const runtime::Object *node)
 Dump the node to stderr, used for debug purposes. More...
 
std::string SaveJSON (const runtime::ObjectRef &node)
 save the node as well as all the node it depends on as json. This can be used to serialize any TVM object More...
 
runtime::ObjectRef LoadJSON (std::string json_str)
 Internal implementation of LoadJSON Load tvm Node object from json and return a shared_ptr of Node. More...
 
void CheckAndUpdateHostConsistency (Target *target, Target *host)
 Check and update host field of the given legacy target and target host pair. Note that this function is for legacy target api compatibility issue only, not recommended for other use. More...
 
MemoryInfo GetMemoryInfo (const std::string &scope)
 get memory info given scope More...
 
Type GetType (const PrimExpr &expr)
 Get the type of the expression under the unified type system. More...
 
Type GetTypeFromRuntimeDataType (const DataType &dtype)
 Get the type corresponding to DataType. More...
 
runtime::DataType GetRuntimeDataType (const Type &type)
 Get the implied DataType for storing values with type during runtime. More...
 
PrimExpr ret (PrimExpr value, Span span=Span())
 Return the value. More...
 
PrimExpr max_value (const DataType &dtype, Span span=Span())
 
PrimExpr min_value (const DataType &dtype, Span span=Span())
 
PrimExpr infinity (const DataType &dtype, Span span=Span())
 
PrimExpr cast (const DataType &t, PrimExpr value, Span span=Span())
 cast value to type. More...
 
PrimExpr reinterpret (const DataType &t, PrimExpr value, Span span=Span())
 perform reinterpret cast value to type. More...
 
PrimExpr add (PrimExpr a, PrimExpr b, Span span=Span())
 add operator More...
 
PrimExpr sub (PrimExpr a, PrimExpr b, Span span=Span())
 subtraction operator More...
 
PrimExpr neg (PrimExpr a, Span span=Span())
 negation. More...
 
PrimExpr mul (PrimExpr a, PrimExpr b, Span span=Span())
 multiplication operator More...
 
PrimExpr left_shift (PrimExpr a, PrimExpr b, Span span=Span())
 left shift operator More...
 
PrimExpr right_shift (PrimExpr a, PrimExpr b, Span span=Span())
 right shift operator More...
 
PrimExpr greater (PrimExpr a, PrimExpr b, Span span=Span())
 greater More...
 
PrimExpr greater_equal (PrimExpr a, PrimExpr b, Span span=Span())
 greater_equal More...
 
PrimExpr less (PrimExpr a, PrimExpr b, Span span=Span())
 less More...
 
PrimExpr less_equal (PrimExpr a, PrimExpr b, Span span=Span())
 less_equal More...
 
PrimExpr equal (PrimExpr a, PrimExpr b, Span span=Span())
 equal More...
 
PrimExpr not_equal (PrimExpr a, PrimExpr b, Span span=Span())
 not_equal More...
 
PrimExpr logical_and (PrimExpr a, PrimExpr b, Span span=Span())
 and More...
 
PrimExpr logical_or (PrimExpr a, PrimExpr b, Span span=Span())
 or More...
 
PrimExpr logical_not (PrimExpr a, Span span=Span())
 not More...
 
PrimExpr div (PrimExpr a, PrimExpr b, Span span=Span())
 compute division in C semantics. More...
 
PrimExpr truncdiv (PrimExpr a, PrimExpr b, Span span=Span())
 compute trunc(a / b) More...
 
PrimExpr truncmod (PrimExpr a, PrimExpr b, Span span=Span())
 compute the remainder of truncdiv More...
 
PrimExpr indexdiv (PrimExpr a, PrimExpr b, Span span=Span())
 compute floor(a / b) where a and b are non-negative. More...
 
PrimExpr shapediv (PrimExpr a, PrimExpr b, Span span=Span())
 compute ceil(a / b) where a and b are non-negative. More...
 
PrimExpr indexmod (PrimExpr a, PrimExpr b, Span span=Span())
 compute the remainder floor(a / b) where a and b are non-negative. More...
 
PrimExpr floordiv (PrimExpr a, PrimExpr b, Span span=Span())
 compute floor(a / b) More...
 
PrimExpr ceildiv (PrimExpr a, PrimExpr b, Span span=Span())
 compute ceil(a / b) More...
 
PrimExpr floormod (PrimExpr a, PrimExpr b, Span span=Span())
 compute the remainder of floordiv More...
 
PrimExpr max (PrimExpr a, PrimExpr b, Span span=Span())
 take maximum of two values More...
 
PrimExpr min (PrimExpr a, PrimExpr b, Span span=Span())
 take minimum of two values More...
 
PrimExpr bitwise_and (PrimExpr a, PrimExpr b, Span span=Span())
 take bitwise and of two values More...
 
PrimExpr bitwise_or (PrimExpr a, PrimExpr b, Span span=Span())
 take bitwise or of two values More...
 
PrimExpr bitwise_xor (PrimExpr a, PrimExpr b, Span span=Span())
 take bitwise xor of two values More...
 
PrimExpr bitwise_neg (PrimExpr a, Span span=Span())
 take bitwise negation of two values More...
 
PrimExpr if_then_else (PrimExpr cond, PrimExpr true_value, PrimExpr false_value, Span span=Span())
 Conditional expression. More...
 
PrimExpr likely (PrimExpr cond, Span span=Span())
 Mark condition as likely. More...
 
PrimExpr pow (PrimExpr x, PrimExpr y, Span span=Span())
 Calculate power(x, y) More...
 
PrimExpr abs (PrimExpr x, Span span=Span())
 Calculate absolute value of x. More...
 
PrimExpr isnan (PrimExpr x, Span span=Span())
 Check if x is NaN. More...
 
PrimExpr isfinite (PrimExpr x, Span span=Span())
 Check if x is finite. More...
 
PrimExpr isinf (PrimExpr x, Span span=Span())
 Check if x is infinite. More...
 
PrimExpr sum (PrimExpr source, Array< tir::IterVar > axis, Array< PrimExpr > init={}, Span span=Span())
 sum of source expression over axis More...
 
PrimExpr all (PrimExpr source, Array< tir::IterVar > axis, Array< PrimExpr > init={}, Span span=Span())
 logical And of source expression over axis More...
 
PrimExpr any (PrimExpr source, Array< tir::IterVar > axis, Array< PrimExpr > init={}, Span span=Span())
 logical Or of source expression over axis More...
 
PrimExpr max (PrimExpr source, Array< tir::IterVar > axis, Array< PrimExpr > init={}, Span span=Span())
 max of source expression over axis More...
 
PrimExpr min (PrimExpr source, Array< tir::IterVar > axis, Array< PrimExpr > init={}, Span span=Span())
 max of source expression over axis More...
 
PrimExpr prod (PrimExpr source, Array< tir::IterVar > axis, Array< PrimExpr > init={}, Span span=Span())
 product of source expression over axis More...
 
PrimExpr floor (PrimExpr x, Span span=Span())
 Calculate floor(x) More...
 
PrimExpr ceil (PrimExpr x, Span span=Span())
 Calculate ceil(x) More...
 
PrimExpr round (PrimExpr x, Span span=Span())
 Calculate round(x) More...
 
PrimExpr nearbyint (PrimExpr x, Span span=Span())
 Calculates std::nearbyint(x) More...
 
PrimExpr trunc (PrimExpr x, Span span=Span())
 Calculate trunc(x) More...
 
PrimExpr LargeUIntImm (DataType dtype, int64_t low, int64_t high, Span span=Span())
 Construct a large uint constant by its low 32 bits and high 32bits. More...
 
PrimExpr q_multiply_shift (PrimExpr x, PrimExpr y, PrimExpr q, PrimExpr s, Span span=Span())
 Execute a multiplication between two Q-numbers x and y followed by a right shift s. The mathematical expression is: More...
 
PrimExpr fast_erf_float_expr (PrimExpr arg, int bits)
 Fast_erf_float expression from Eigen. More...
 
PrimExpr exp (PrimExpr x, Span span=Span())
 
PrimExpr exp2 (PrimExpr x, Span span=Span())
 
PrimExpr exp10 (PrimExpr x, Span span=Span())
 
PrimExpr erf (PrimExpr x, Span span=Span())
 
PrimExpr tanh (PrimExpr x, Span span=Span())
 
PrimExpr sigmoid (PrimExpr x, Span span=Span())
 
PrimExpr sqrt (PrimExpr x, Span span=Span())
 
PrimExpr rsqrt (PrimExpr x, Span span=Span())
 
PrimExpr log (PrimExpr x, Span span=Span())
 
PrimExpr log2 (PrimExpr x, Span span=Span())
 
PrimExpr log10 (PrimExpr x, Span span=Span())
 
PrimExpr log1p (PrimExpr x, Span span=Span())
 
PrimExpr popcount (PrimExpr x, Span span=Span())
 
PrimExpr tan (PrimExpr x, Span span=Span())
 
PrimExpr cos (PrimExpr x, Span span=Span())
 
PrimExpr cosh (PrimExpr x, Span span=Span())
 
PrimExpr sin (PrimExpr x, Span span=Span())
 
PrimExpr sinh (PrimExpr x, Span span=Span())
 
PrimExpr asin (PrimExpr x, Span span=Span())
 
PrimExpr acos (PrimExpr x, Span span=Span())
 
PrimExpr atan (PrimExpr x, Span span=Span())
 
PrimExpr acosh (PrimExpr x, Span span=Span())
 
PrimExpr asinh (PrimExpr x, Span span=Span())
 
PrimExpr atanh (PrimExpr x, Span span=Span())
 
PrimExpr clz (PrimExpr x, Span span=Span())
 
PrimExpr atan2 (PrimExpr x, PrimExpr y, Span span=Span())
 
PrimExpr nextafter (PrimExpr x, PrimExpr y, Span span=Span())
 
PrimExpr copysign (PrimExpr x, PrimExpr y, Span span=Span())
 
PrimExpr hypot (PrimExpr x, PrimExpr y, Span span=Span())
 
PrimExpr ldexp (PrimExpr x, PrimExpr y, Span span=Span())
 
PrimExpr operator+= (PrimExpr &a, PrimExpr b)
 
PrimExpr operator-= (PrimExpr &a, PrimExpr b)
 
PrimExpr operator*= (PrimExpr &a, PrimExpr 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 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, Span span=Span())
 
PrimExpr max (float a, const PrimExpr &b, Span span=Span())
 
PrimExpr max (int a, const PrimExpr &b, Span span=Span())
 
PrimExpr max (const PrimExpr &a, int b, Span span=Span())
 
PrimExpr max (const PrimExpr &a, double b, Span span=Span())
 
PrimExpr min (const PrimExpr &a, float b, Span span=Span())
 
PrimExpr min (float a, const PrimExpr &b, Span span=Span())
 
PrimExpr min (int a, const PrimExpr &b, Span span=Span())
 
PrimExpr min (const PrimExpr &a, int b, Span span=Span())
 
PrimExpr min (const PrimExpr &a, double b, Span span=Span())
 
PrimExpr div (const PrimExpr &a, float b, Span span=Span())
 
PrimExpr div (float a, const PrimExpr &b, Span span=Span())
 
PrimExpr div (int a, const PrimExpr &b, Span span=Span())
 
PrimExpr div (const PrimExpr &a, int b, Span span=Span())
 
PrimExpr div (const PrimExpr &a, double b, Span span=Span())
 
PrimExpr add (const PrimExpr &a, float b, Span span=Span())
 
PrimExpr add (float a, const PrimExpr &b, Span span=Span())
 
PrimExpr add (int a, const PrimExpr &b, Span span=Span())
 
PrimExpr add (const PrimExpr &a, int b, Span span=Span())
 
PrimExpr add (const PrimExpr &a, double b, Span span=Span())
 
PrimExpr sub (const PrimExpr &a, float b, Span span=Span())
 
PrimExpr sub (float a, const PrimExpr &b, Span span=Span())
 
PrimExpr sub (int a, const PrimExpr &b, Span span=Span())
 
PrimExpr sub (const PrimExpr &a, int b, Span span=Span())
 
PrimExpr sub (const PrimExpr &a, double b, Span span=Span())
 
PrimExpr mul (const PrimExpr &a, float b, Span span=Span())
 
PrimExpr mul (float a, const PrimExpr &b, Span span=Span())
 
PrimExpr mul (int a, const PrimExpr &b, Span span=Span())
 
PrimExpr mul (const PrimExpr &a, int b, Span span=Span())
 
PrimExpr mul (const PrimExpr &a, double b, Span span=Span())
 
PrimExpr greater (const PrimExpr &a, float b, Span span=Span())
 
PrimExpr greater (float a, const PrimExpr &b, Span span=Span())
 
PrimExpr greater (int a, const PrimExpr &b, Span span=Span())
 
PrimExpr greater (const PrimExpr &a, int b, Span span=Span())
 
PrimExpr greater (const PrimExpr &a, double b, Span span=Span())
 
PrimExpr greater_equal (const PrimExpr &a, float b, Span span=Span())
 
PrimExpr greater_equal (float a, const PrimExpr &b, Span span=Span())
 
PrimExpr greater_equal (int a, const PrimExpr &b, Span span=Span())
 
PrimExpr greater_equal (const PrimExpr &a, int b, Span span=Span())
 
PrimExpr greater_equal (const PrimExpr &a, double b, Span span=Span())
 
PrimExpr less (const PrimExpr &a, float b, Span span=Span())
 
PrimExpr less (float a, const PrimExpr &b, Span span=Span())
 
PrimExpr less (int a, const PrimExpr &b, Span span=Span())
 
PrimExpr less (const PrimExpr &a, int b, Span span=Span())
 
PrimExpr less (const PrimExpr &a, double b, Span span=Span())
 
PrimExpr less_equal (const PrimExpr &a, float b, Span span=Span())
 
PrimExpr less_equal (float a, const PrimExpr &b, Span span=Span())
 
PrimExpr less_equal (int a, const PrimExpr &b, Span span=Span())
 
PrimExpr less_equal (const PrimExpr &a, int b, Span span=Span())
 
PrimExpr less_equal (const PrimExpr &a, double b, Span span=Span())
 
PrimExpr indexdiv (const PrimExpr &a, int b, Span span=Span())
 
PrimExpr indexdiv (int a, const PrimExpr &b, Span span=Span())
 
PrimExpr indexmod (const PrimExpr &a, int b, Span span=Span())
 
PrimExpr indexmod (int a, const PrimExpr &b, Span span=Span())
 
PrimExpr truncdiv (const PrimExpr &a, int b, Span span=Span())
 
PrimExpr truncdiv (int a, const PrimExpr &b, Span span=Span())
 
PrimExpr truncmod (const PrimExpr &a, int b, Span span=Span())
 
PrimExpr truncmod (int a, const PrimExpr &b, Span span=Span())
 
PrimExpr floordiv (const PrimExpr &a, int b, Span span=Span())
 
PrimExpr floordiv (int a, const PrimExpr &b, Span span=Span())
 
PrimExpr floormod (const PrimExpr &a, int b, Span span=Span())
 
PrimExpr floormod (int a, const PrimExpr &b, Span span=Span())
 
PrimExpr right_shift (const PrimExpr &a, int b, Span span=Span())
 
PrimExpr right_shift (int a, const PrimExpr &b, Span span=Span())
 
PrimExpr left_shift (const PrimExpr &a, int b, Span span=Span())
 
PrimExpr left_shift (int a, const PrimExpr &b, Span span=Span())
 
PrimExpr bitwise_and (const PrimExpr &a, int b, Span span=Span())
 
PrimExpr bitwise_and (int a, const PrimExpr &b, Span span=Span())
 
PrimExpr bitwise_or (const PrimExpr &a, int b, Span span=Span())
 
PrimExpr bitwise_or (int a, const PrimExpr &b, Span span=Span())
 
PrimExpr bitwise_xor (const PrimExpr &a, int b, Span span=Span())
 
PrimExpr bitwise_xor (int a, const PrimExpr &b, Span span=Span())
 
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, Span span=Span())
 
PrimExpr logical_and (bool a, const PrimExpr &b, Span span=Span())
 
PrimExpr logical_or (const PrimExpr &a, bool b, Span span=Span())
 
PrimExpr logical_or (bool a, const PrimExpr &b, Span span=Span())
 
template<typename TA >
void DivAmbiguityError (const TA &a)
 Helper function to raise a compiler error about division ambiguity. More...
 
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)
 

Variables

constexpr runtime::NullOptType NullOpt {}
 
constexpr int kNullDeviceType = 0
 
constexpr int kInvalidDeviceType = -1
 
constexpr const char * kVirtualDevice = "virtual_device"
 

Detailed Description

Performance counters for profiling via the PAPI library.

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

Typedef Documentation

◆ DataType

◆ Device

using tvm::Device = typedef DLDevice

◆ FTVMTargetParser

◆ MemoryScope

Abstract label for an area of memory.

Abstract label for an area of memory.

Currently uninterpreted and arbitrary. Likely to be replaced by a structured representation of a memory pool in the future. Please try to use this alias instead of String to aid future code migration.

◆ TargetFeatures

Map containing parsed features of a specific Target.

◆ TargetJSON

using tvm::TargetJSON = typedef Map<String, ObjectRef>

TargetParser to apply on instantiation of a given TargetKind.

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

Enumeration Type Documentation

◆ CallingConv

enum 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 

PackedFunc that exposes a CPackedFunc signature.

  • Calling by PackedFunc calling convention.
  • Implementation: Expose a function with the CPackedFunc signature.
kDeviceKernelLaunch 

Device kernel launch.

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

◆ DiagnosticLevel

enum tvm::DiagnosticLevel : int
strong

The diagnostic level, controls the printing of the message.

Enumerator
kBug 
kError 
kWarning 
kNote 
kHelp 

◆ LinkageType

enum 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

◆ abs()

PrimExpr tvm::abs ( PrimExpr  x,
Span  span = Span() 
)

Calculate absolute value of x.

Parameters
xThe input data
spanThe location of this operation in the source.
Returns
The absolute value of input data x

◆ acos()

PrimExpr tvm::acos ( PrimExpr  x,
Span  span = Span() 
)
inline

◆ acosh()

PrimExpr tvm::acosh ( PrimExpr  x,
Span  span = Span() 
)
inline

◆ add() [1/6]

PrimExpr tvm::add ( const PrimExpr a,
double  b,
Span  span = Span() 
)
inline

◆ add() [2/6]

PrimExpr tvm::add ( const PrimExpr a,
float  b,
Span  span = Span() 
)
inline

◆ add() [3/6]

PrimExpr tvm::add ( const PrimExpr a,
int  b,
Span  span = Span() 
)
inline

◆ add() [4/6]

PrimExpr tvm::add ( float  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ add() [5/6]

PrimExpr tvm::add ( int  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ add() [6/6]

PrimExpr tvm::add ( PrimExpr  a,
PrimExpr  b,
Span  span = Span() 
)

add operator

Parameters
aleft operand
bright operand
spanThe 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.

◆ all()

PrimExpr tvm::all ( PrimExpr  source,
Array< tir::IterVar axis,
Array< PrimExpr init = {},
Span  span = Span() 
)

logical And 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.
spanThe location of this operation in the source.

◆ any()

PrimExpr tvm::any ( PrimExpr  source,
Array< tir::IterVar axis,
Array< PrimExpr init = {},
Span  span = Span() 
)

logical Or 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.
spanThe location of this operation in the source.
Returns
The result.

◆ asin()

PrimExpr tvm::asin ( PrimExpr  x,
Span  span = Span() 
)
inline

◆ asinh()

PrimExpr tvm::asinh ( PrimExpr  x,
Span  span = Span() 
)
inline

◆ atan()

PrimExpr tvm::atan ( PrimExpr  x,
Span  span = Span() 
)
inline

◆ atan2()

PrimExpr tvm::atan2 ( PrimExpr  x,
PrimExpr  y,
Span  span = Span() 
)
inline

◆ atanh()

PrimExpr tvm::atanh ( PrimExpr  x,
Span  span = Span() 
)
inline

◆ AttrsWithDefaultValues()

template<typename TAttrs >
TAttrs tvm::AttrsWithDefaultValues ( )
inline

Create an Attr object with all default values.

Template Parameters
TAttrNodethe type to be created.
Returns
A instance that will represent None.

◆ bitwise_and() [1/3]

PrimExpr tvm::bitwise_and ( const PrimExpr a,
int  b,
Span  span = Span() 
)
inline

◆ bitwise_and() [2/3]

PrimExpr tvm::bitwise_and ( int  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ bitwise_and() [3/3]

PrimExpr tvm::bitwise_and ( PrimExpr  a,
PrimExpr  b,
Span  span = Span() 
)

take bitwise and of two values

Parameters
aleft operand
bright operand
spanThe 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()

PrimExpr tvm::bitwise_neg ( PrimExpr  a,
Span  span = Span() 
)

take bitwise negation of two values

Parameters
athe input expression.
spanThe 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,
Span  span = Span() 
)
inline

◆ bitwise_or() [2/3]

PrimExpr tvm::bitwise_or ( int  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ bitwise_or() [3/3]

PrimExpr tvm::bitwise_or ( PrimExpr  a,
PrimExpr  b,
Span  span = Span() 
)

take bitwise or of two values

Parameters
aleft operand
bright operand
spanThe 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,
Span  span = Span() 
)
inline

◆ bitwise_xor() [2/3]

PrimExpr tvm::bitwise_xor ( int  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ bitwise_xor() [3/3]

PrimExpr tvm::bitwise_xor ( PrimExpr  a,
PrimExpr  b,
Span  span = Span() 
)

take bitwise xor of two values

Parameters
aleft operand
bright operand
spanThe 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.

◆ cast()

PrimExpr tvm::cast ( const DataType t,
PrimExpr  value,
Span  span = Span() 
)

cast value to type.

Parameters
tthe target type.
valueThe value
spanThe location of this operation in the source.
Returns
The result expression.
Note
This function may return value if the type is the same.

◆ ceil()

PrimExpr tvm::ceil ( PrimExpr  x,
Span  span = Span() 
)

Calculate ceil(x)

Parameters
xThe input expression.
spanThe location of this operation in the source.
Returns
The result expression.

◆ ceildiv()

PrimExpr tvm::ceildiv ( PrimExpr  a,
PrimExpr  b,
Span  span = Span() 
)

compute ceil(a / b)

Parameters
aleft operand
bright operand
spanThe 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.

◆ CheckAndUpdateHostConsistency()

void tvm::CheckAndUpdateHostConsistency ( Target target,
Target host 
)

Check and update host field of the given legacy target and target host pair. Note that this function is for legacy target api compatibility issue only, not recommended for other use.

Parameters
targetThe pointer to a Target typed object with host field to be updated
hostThe pointer to a Target typed object for target host to be updated

◆ clz()

PrimExpr tvm::clz ( PrimExpr  x,
Span  span = Span() 
)
inline

◆ copysign()

PrimExpr tvm::copysign ( PrimExpr  x,
PrimExpr  y,
Span  span = Span() 
)
inline

◆ cos()

PrimExpr tvm::cos ( PrimExpr  x,
Span  span = Span() 
)
inline

◆ cosh()

PrimExpr tvm::cosh ( PrimExpr  x,
Span  span = Span() 
)
inline

◆ div() [1/6]

PrimExpr tvm::div ( const PrimExpr a,
double  b,
Span  span = Span() 
)
inline

◆ div() [2/6]

PrimExpr tvm::div ( const PrimExpr a,
float  b,
Span  span = Span() 
)
inline

◆ div() [3/6]

PrimExpr tvm::div ( const PrimExpr a,
int  b,
Span  span = Span() 
)
inline

◆ div() [4/6]

PrimExpr tvm::div ( float  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ div() [5/6]

PrimExpr tvm::div ( int  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ div() [6/6]

PrimExpr tvm::div ( PrimExpr  a,
PrimExpr  b,
Span  span = Span() 
)

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
spanThe 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.

◆ Dump() [1/2]

void tvm::Dump ( const runtime::Object node)

Dump the node to stderr, used for debug purposes.

Parameters
nodeThe input node

◆ Dump() [2/2]

void tvm::Dump ( const runtime::ObjectRef node)

Dump the node to stderr, used for debug purposes.

Parameters
nodeThe input node

◆ equal()

PrimExpr tvm::equal ( PrimExpr  a,
PrimExpr  b,
Span  span = Span() 
)

equal

Parameters
aleft operand
bright operand
spanThe 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.

◆ erf()

PrimExpr tvm::erf ( PrimExpr  x,
Span  span = Span() 
)
inline

◆ exp()

PrimExpr tvm::exp ( PrimExpr  x,
Span  span = Span() 
)
inline

◆ exp10()

PrimExpr tvm::exp10 ( PrimExpr  x,
Span  span = Span() 
)
inline

◆ exp2()

PrimExpr tvm::exp2 ( PrimExpr  x,
Span  span = Span() 
)
inline

◆ fast_erf_float_expr()

PrimExpr tvm::fast_erf_float_expr ( PrimExpr  arg,
int  bits 
)

Fast_erf_float expression from Eigen.

Parameters
argThe input expression.
bitsThe number of bits in the type.
Returns
The constructed expression.

◆ floor()

PrimExpr tvm::floor ( PrimExpr  x,
Span  span = Span() 
)

Calculate floor(x)

Parameters
xThe input expression.
spanThe location of this operation in the source.
Returns
The result expression.

◆ floordiv() [1/3]

PrimExpr tvm::floordiv ( const PrimExpr a,
int  b,
Span  span = Span() 
)
inline

◆ floordiv() [2/3]

PrimExpr tvm::floordiv ( int  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ floordiv() [3/3]

PrimExpr tvm::floordiv ( PrimExpr  a,
PrimExpr  b,
Span  span = Span() 
)

compute floor(a / b)

Parameters
aleft operand
bright operand
spanThe 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/3]

PrimExpr tvm::floormod ( const PrimExpr a,
int  b,
Span  span = Span() 
)
inline

◆ floormod() [2/3]

PrimExpr tvm::floormod ( int  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ floormod() [3/3]

PrimExpr tvm::floormod ( PrimExpr  a,
PrimExpr  b,
Span  span = Span() 
)

compute the remainder of floordiv

Parameters
aleft operand
bright operand
spanThe 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.

◆ GetAttrKeyByAddress()

Optional<String> tvm::GetAttrKeyByAddress ( const Object object,
const void *  attr_address 
)

Given an object and an address of its attribute, return the key of the attribute.

Returns
nullptr if no attribute with the given address exists.

◆ GetMemoryInfo()

MemoryInfo tvm::GetMemoryInfo ( const std::string &  scope)

get memory info given scope

Parameters
scopeThe scope name.
Returns
info The memory info.

◆ GetRuntimeDataType()

runtime::DataType tvm::GetRuntimeDataType ( const Type type)

Get the implied DataType for storing values with type during runtime.

Parameters
typeThe input type.
Returns
The result runtime::DataType.
See also
tvm/ir/type.h for discussion about the relation between Type and runtime::DataType.

◆ GetType()

Type tvm::GetType ( const PrimExpr expr)

Get the type of the expression under the unified type system.

This function could return a more refined type than the runtime type provided by expr->dtype

Parameters
exprThe input parameter.
Returns
The result type.
See also
tvm/ir/type.h for discussion about the relation between Type and runtime::DataType.

◆ GetTypeFromRuntimeDataType()

Type tvm::GetTypeFromRuntimeDataType ( const DataType dtype)

Get the type corresponding to DataType.

Parameters
dtypeThe data type
Returns
The result type
See also
tvm/ir/type.h for discussion about the relation between Type and runtime::DataType.

◆ greater() [1/6]

PrimExpr tvm::greater ( const PrimExpr a,
double  b,
Span  span = Span() 
)
inline

◆ greater() [2/6]

PrimExpr tvm::greater ( const PrimExpr a,
float  b,
Span  span = Span() 
)
inline

◆ greater() [3/6]

PrimExpr tvm::greater ( const PrimExpr a,
int  b,
Span  span = Span() 
)
inline

◆ greater() [4/6]

PrimExpr tvm::greater ( float  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ greater() [5/6]

PrimExpr tvm::greater ( int  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ greater() [6/6]

PrimExpr tvm::greater ( PrimExpr  a,
PrimExpr  b,
Span  span = Span() 
)

greater

Parameters
aleft operand
bright operand
spanThe 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,
Span  span = Span() 
)
inline

◆ greater_equal() [2/6]

PrimExpr tvm::greater_equal ( const PrimExpr a,
float  b,
Span  span = Span() 
)
inline

◆ greater_equal() [3/6]

PrimExpr tvm::greater_equal ( const PrimExpr a,
int  b,
Span  span = Span() 
)
inline

◆ greater_equal() [4/6]

PrimExpr tvm::greater_equal ( float  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ greater_equal() [5/6]

PrimExpr tvm::greater_equal ( int  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ greater_equal() [6/6]

PrimExpr tvm::greater_equal ( PrimExpr  a,
PrimExpr  b,
Span  span = Span() 
)

greater_equal

Parameters
aleft operand
bright operand
spanThe 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.

◆ hypot()

PrimExpr tvm::hypot ( PrimExpr  x,
PrimExpr  y,
Span  span = Span() 
)
inline

◆ if_then_else()

PrimExpr tvm::if_then_else ( PrimExpr  cond,
PrimExpr  true_value,
PrimExpr  false_value,
Span  span = Span() 
)

Conditional expression.

Parameters
condThe condition
true_valueThe value when results are true.
false_valueThe value when results are false.
spanThe 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,
Span  span = Span() 
)
inline

◆ indexdiv() [2/3]

PrimExpr tvm::indexdiv ( int  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ indexdiv() [3/3]

PrimExpr tvm::indexdiv ( PrimExpr  a,
PrimExpr  b,
Span  span = Span() 
)

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
spanThe 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,
Span  span = Span() 
)
inline

◆ indexmod() [2/3]

PrimExpr tvm::indexmod ( int  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ indexmod() [3/3]

PrimExpr tvm::indexmod ( PrimExpr  a,
PrimExpr  b,
Span  span = Span() 
)

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
spanThe 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.

◆ infinity()

PrimExpr tvm::infinity ( const DataType dtype,
Span  span = Span() 
)

Get the value of infinity.

Parameters
dtypeThe data type.
spanThe location of this operation in the source.
Returns
the infinity value in this format.

◆ isfinite()

PrimExpr tvm::isfinite ( PrimExpr  x,
Span  span = Span() 
)

Check if x is finite.

Parameters
xThe input data
spanThe location of this operation in the source.
Returns
The result expression.

◆ isinf()

PrimExpr tvm::isinf ( PrimExpr  x,
Span  span = Span() 
)

Check if x is infinite.

Parameters
xThe input data
spanThe location of this operation in the source.
Returns
The result expression.

◆ isnan()

PrimExpr tvm::isnan ( PrimExpr  x,
Span  span = Span() 
)

Check if x is NaN.

Parameters
xThe input data
spanThe location of this operation in the source.
Returns
The result expression.

◆ IsVoidType()

bool tvm::IsVoidType ( const Type type)
inline

Check whether the tyep represents void.

Returns
The check result.

◆ LargeUIntImm()

PrimExpr tvm::LargeUIntImm ( DataType  dtype,
int64_t  low,
int64_t  high,
Span  span = Span() 
)

Construct a large uint constant by its low 32 bits and high 32bits.

Parameters
dtypeThe final data type.
lowThe lower 32 bits.
highThe higher 32 bits.
spanThe location of this operation in the source.
Returns
The constructed expression.

◆ ldexp()

PrimExpr tvm::ldexp ( PrimExpr  x,
PrimExpr  y,
Span  span = Span() 
)
inline

◆ left_shift() [1/3]

PrimExpr tvm::left_shift ( const PrimExpr a,
int  b,
Span  span = Span() 
)
inline

◆ left_shift() [2/3]

PrimExpr tvm::left_shift ( int  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ left_shift() [3/3]

PrimExpr tvm::left_shift ( PrimExpr  a,
PrimExpr  b,
Span  span = Span() 
)

left shift operator

Parameters
aleft operand
bright operand
spanThe 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,
Span  span = Span() 
)
inline

◆ less() [2/6]

PrimExpr tvm::less ( const PrimExpr a,
float  b,
Span  span = Span() 
)
inline

◆ less() [3/6]

PrimExpr tvm::less ( const PrimExpr a,
int  b,
Span  span = Span() 
)
inline

◆ less() [4/6]

PrimExpr tvm::less ( float  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ less() [5/6]

PrimExpr tvm::less ( int  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ less() [6/6]

PrimExpr tvm::less ( PrimExpr  a,
PrimExpr  b,
Span  span = Span() 
)

less

Parameters
aleft operand
bright operand
spanThe 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,
Span  span = Span() 
)
inline

◆ less_equal() [2/6]

PrimExpr tvm::less_equal ( const PrimExpr a,
float  b,
Span  span = Span() 
)
inline

◆ less_equal() [3/6]

PrimExpr tvm::less_equal ( const PrimExpr a,
int  b,
Span  span = Span() 
)
inline

◆ less_equal() [4/6]

PrimExpr tvm::less_equal ( float  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ less_equal() [5/6]

PrimExpr tvm::less_equal ( int  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ less_equal() [6/6]

PrimExpr tvm::less_equal ( PrimExpr  a,
PrimExpr  b,
Span  span = Span() 
)

less_equal

Parameters
aleft operand
bright operand
spanThe 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()

PrimExpr tvm::likely ( PrimExpr  cond,
Span  span = Span() 
)

Mark condition as likely.

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

◆ LoadJSON()

runtime::ObjectRef tvm::LoadJSON ( std::string  json_str)

Internal implementation of LoadJSON Load tvm Node object from json and return a shared_ptr of Node.

Parameters
json_strThe json string to load from.
Returns
The shared_ptr of the Node.

◆ log()

PrimExpr tvm::log ( PrimExpr  x,
Span  span = Span() 
)
inline

◆ log10()

PrimExpr tvm::log10 ( PrimExpr  x,
Span  span = Span() 
)
inline

◆ log1p()

PrimExpr tvm::log1p ( PrimExpr  x,
Span  span = Span() 
)
inline

◆ log2()

PrimExpr tvm::log2 ( PrimExpr  x,
Span  span = Span() 
)
inline

◆ logical_and() [1/3]

PrimExpr tvm::logical_and ( bool  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ logical_and() [2/3]

PrimExpr tvm::logical_and ( const PrimExpr a,
bool  b,
Span  span = Span() 
)
inline

◆ logical_and() [3/3]

PrimExpr tvm::logical_and ( PrimExpr  a,
PrimExpr  b,
Span  span = Span() 
)

and

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

◆ logical_not()

PrimExpr tvm::logical_not ( PrimExpr  a,
Span  span = Span() 
)

not

Parameters
aleft operand
spanThe 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,
Span  span = Span() 
)
inline

◆ logical_or() [2/3]

PrimExpr tvm::logical_or ( const PrimExpr a,
bool  b,
Span  span = Span() 
)
inline

◆ logical_or() [3/3]

PrimExpr tvm::logical_or ( PrimExpr  a,
PrimExpr  b,
Span  span = Span() 
)

or

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

◆ max() [1/7]

PrimExpr tvm::max ( const PrimExpr a,
double  b,
Span  span = Span() 
)
inline

◆ max() [2/7]

PrimExpr tvm::max ( const PrimExpr a,
float  b,
Span  span = Span() 
)
inline

◆ max() [3/7]

PrimExpr tvm::max ( const PrimExpr a,
int  b,
Span  span = Span() 
)
inline

◆ max() [4/7]

PrimExpr tvm::max ( float  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ max() [5/7]

PrimExpr tvm::max ( int  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ max() [6/7]

PrimExpr tvm::max ( PrimExpr  a,
PrimExpr  b,
Span  span = Span() 
)

take maximum of two values

Parameters
aleft operand
bright operand
spanThe 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() [7/7]

PrimExpr tvm::max ( PrimExpr  source,
Array< tir::IterVar axis,
Array< PrimExpr init = {},
Span  span = Span() 
)

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.
spanThe location of this operation in the source.
Returns
The result.

◆ max_value()

PrimExpr tvm::max_value ( const DataType dtype,
Span  span = Span() 
)

Query the maximum possible value of dtype.

Parameters
dtypeThe data type.
spanThe location of this operation in the source.
Returns
the maximum possible value in this format.

◆ min() [1/7]

PrimExpr tvm::min ( const PrimExpr a,
double  b,
Span  span = Span() 
)
inline

◆ min() [2/7]

PrimExpr tvm::min ( const PrimExpr a,
float  b,
Span  span = Span() 
)
inline

◆ min() [3/7]

PrimExpr tvm::min ( const PrimExpr a,
int  b,
Span  span = Span() 
)
inline

◆ min() [4/7]

PrimExpr tvm::min ( float  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ min() [5/7]

PrimExpr tvm::min ( int  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ min() [6/7]

PrimExpr tvm::min ( PrimExpr  a,
PrimExpr  b,
Span  span = Span() 
)

take minimum of two values

Parameters
aleft operand
bright operand
spanThe 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.
Examples
/workspace/include/tvm/runtime/threading_backend.h.

◆ min() [7/7]

PrimExpr tvm::min ( PrimExpr  source,
Array< tir::IterVar axis,
Array< PrimExpr init = {},
Span  span = Span() 
)

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.
spanThe location of this operation in the source.
Returns
The result.

◆ min_value()

PrimExpr tvm::min_value ( const DataType dtype,
Span  span = Span() 
)

Query the minimum possible value of dtype.

Parameters
dtypeThe data type.
spanThe location of this operation in the source.
Returns
the minimum possible value in this format.

◆ mul() [1/6]

PrimExpr tvm::mul ( const PrimExpr a,
double  b,
Span  span = Span() 
)
inline

◆ mul() [2/6]

PrimExpr tvm::mul ( const PrimExpr a,
float  b,
Span  span = Span() 
)
inline

◆ mul() [3/6]

PrimExpr tvm::mul ( const PrimExpr a,
int  b,
Span  span = Span() 
)
inline

◆ mul() [4/6]

PrimExpr tvm::mul ( float  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ mul() [5/6]

PrimExpr tvm::mul ( int  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ mul() [6/6]

PrimExpr tvm::mul ( PrimExpr  a,
PrimExpr  b,
Span  span = Span() 
)

multiplication operator

Parameters
aleft operand
bright operand
spanThe 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.

◆ nearbyint()

PrimExpr tvm::nearbyint ( PrimExpr  x,
Span  span = Span() 
)

Calculates std::nearbyint(x)

Parameters
xThe input expression.
spanThe location of this operation in the source.
Returns
The result expression. This is a faster alternate to round.

◆ neg()

PrimExpr tvm::neg ( PrimExpr  a,
Span  span = Span() 
)

negation.

Parameters
ainput.
spanThe 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.

◆ nextafter()

PrimExpr tvm::nextafter ( PrimExpr  x,
PrimExpr  y,
Span  span = Span() 
)
inline

◆ not_equal()

PrimExpr tvm::not_equal ( PrimExpr  a,
PrimExpr  b,
Span  span = Span() 
)

not_equal

Parameters
aleft operand
bright operand
spanThe 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.

◆ NullValue()

template<typename TObjectRef >
TObjectRef tvm::NullValue ( )
inline

Create a NodeRef type that represents null.

Template Parameters
TNodeRefthe type to be created.
Returns
A instance that will represent None.

◆ NullValue< DataType >()

template<>
DataType tvm::NullValue< DataType > ( )
inline

◆ operator!()

PrimExpr tvm::operator! ( PrimExpr  a)

not

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

◆ operator!=()

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%()

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

◆ operator&() [1/3]

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

◆ operator&() [2/3]

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

◆ operator&() [3/3]

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]

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

◆ operator&&() [2/6]

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

◆ operator&&() [3/6]

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

◆ operator&&() [4/6]

Bool tvm::operator&& ( const Bool a,
const Bool b 
)
inline

◆ operator&&() [5/6]

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

◆ operator&&() [6/6]

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/6]

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

◆ operator*() [2/6]

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

◆ operator*() [3/6]

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

◆ operator*() [4/6]

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

◆ operator*() [5/6]

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

◆ operator*() [6/6]

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

◆ operator+() [1/6]

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

◆ operator+() [2/6]

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

◆ operator+() [3/6]

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

◆ operator+() [4/6]

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

◆ operator+() [5/6]

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

◆ operator+() [6/6]

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

◆ operator-() [1/7]

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

◆ operator-() [2/7]

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

◆ operator-() [3/7]

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

◆ operator-() [4/7]

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

◆ operator-() [5/7]

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

◆ operator-() [6/7]

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-() [7/7]

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

◆ operator/() [1/2]

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

◆ operator/() [2/2]

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/6]

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

◆ operator<() [2/6]

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

◆ operator<() [3/6]

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

◆ operator<() [4/6]

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

◆ operator<() [5/6]

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

◆ operator<() [6/6]

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/3]

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

◆ operator<<() [2/3]

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

◆ operator<<() [3/3]

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<=() [1/6]

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

◆ operator<=() [2/6]

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

◆ operator<=() [3/6]

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

◆ operator<=() [4/6]

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

◆ operator<=() [5/6]

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

◆ operator<=() [6/6]

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/4]

bool tvm::operator== ( bool  a,
const Bool b 
)
inline

◆ operator==() [2/4]

bool tvm::operator== ( const Bool a,
bool  b 
)
inline

◆ operator==() [3/4]

bool tvm::operator== ( const Bool a,
const Bool b 
)
inline

◆ operator==() [4/4]

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/6]

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

◆ operator>() [2/6]

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

◆ operator>() [3/6]

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

◆ operator>() [4/6]

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

◆ operator>() [5/6]

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

◆ operator>() [6/6]

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/6]

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

◆ operator>=() [2/6]

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

◆ operator>=() [3/6]

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

◆ operator>=() [4/6]

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

◆ operator>=() [5/6]

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

◆ operator>=() [6/6]

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/3]

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

◆ operator>>() [2/3]

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

◆ operator>>() [3/3]

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/3]

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

◆ operator^() [2/3]

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

◆ operator^() [3/3]

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/3]

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

◆ operator|() [2/3]

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

◆ operator|() [3/3]

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]

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

◆ operator||() [2/6]

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

◆ operator||() [3/6]

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

◆ operator||() [4/6]

Bool tvm::operator|| ( const Bool a,
const Bool b 
)
inline

◆ operator||() [5/6]

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

◆ operator||() [6/6]

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~()

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.

◆ popcount()

PrimExpr tvm::popcount ( PrimExpr  x,
Span  span = Span() 
)
inline

◆ pow()

PrimExpr tvm::pow ( PrimExpr  x,
PrimExpr  y,
Span  span = Span() 
)

Calculate power(x, y)

Parameters
xThe left operand.
yThe right operand.
spanThe location of this operation in the source.

◆ prod()

PrimExpr tvm::prod ( PrimExpr  source,
Array< tir::IterVar axis,
Array< PrimExpr init = {},
Span  span = Span() 
)

product 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.
spanThe location of this operation in the source.
Returns
The result.

◆ q_multiply_shift()

PrimExpr tvm::q_multiply_shift ( PrimExpr  x,
PrimExpr  y,
PrimExpr  q,
PrimExpr  s,
Span  span = Span() 
)

Execute a multiplication between two Q-numbers x and y followed by a right shift s. The mathematical expression is:

out = round(x*y*2^-s)

Please note that the two Q-numbers x and y are supposed to have the same number of fractional bits q.

More about Q-numbers here: https://en.wikipedia.org/wiki/Q_(number_format)

The rounding rule is to the nearest value, rounding half up (i.e., round(x.1) = x and round (x.5) = x+1)

Parameters
xfirst Q-number
ysecond Q-number
qnumber of fractional bits in x and y. Needs to be > 0
sinteger right shift
spanThe location of this operation in the source.
Returns
The constructed expression.

◆ reinterpret()

PrimExpr tvm::reinterpret ( const DataType t,
PrimExpr  value,
Span  span = Span() 
)

perform reinterpret cast value to type.

Parameters
tthe target type.
valueThe value
spanThe location of this operation in the source.
Returns
The result expression.
Note
This function may return value if the type is the same.

◆ ret()

PrimExpr tvm::ret ( PrimExpr  value,
Span  span = Span() 
)

Return the value.

Parameters
valueThe returned value.
spanThe location of this operation in the source.
Returns
The return expression.

◆ right_shift() [1/3]

PrimExpr tvm::right_shift ( const PrimExpr a,
int  b,
Span  span = Span() 
)
inline

◆ right_shift() [2/3]

PrimExpr tvm::right_shift ( int  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ right_shift() [3/3]

PrimExpr tvm::right_shift ( PrimExpr  a,
PrimExpr  b,
Span  span = Span() 
)

right shift operator

Parameters
aleft operand
bright operand
spanThe 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.

◆ round()

PrimExpr tvm::round ( PrimExpr  x,
Span  span = Span() 
)

Calculate round(x)

Parameters
xThe input expression.
spanThe location of this operation in the source.
Returns
The result expression.

◆ rsqrt()

PrimExpr tvm::rsqrt ( PrimExpr  x,
Span  span = Span() 
)
inline

◆ SaveJSON()

std::string tvm::SaveJSON ( const runtime::ObjectRef node)

save the node as well as all the node it depends on as json. This can be used to serialize any TVM object

Returns
the string representation of the node.

◆ shapediv()

PrimExpr tvm::shapediv ( PrimExpr  a,
PrimExpr  b,
Span  span = Span() 
)

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
spanThe 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.

◆ sigmoid()

PrimExpr tvm::sigmoid ( PrimExpr  x,
Span  span = Span() 
)
inline

◆ sin()

PrimExpr tvm::sin ( PrimExpr  x,
Span  span = Span() 
)
inline

◆ sinh()

PrimExpr tvm::sinh ( PrimExpr  x,
Span  span = Span() 
)
inline

◆ sqrt()

PrimExpr tvm::sqrt ( PrimExpr  x,
Span  span = Span() 
)
inline

◆ sub() [1/6]

PrimExpr tvm::sub ( const PrimExpr a,
double  b,
Span  span = Span() 
)
inline

◆ sub() [2/6]

PrimExpr tvm::sub ( const PrimExpr a,
float  b,
Span  span = Span() 
)
inline

◆ sub() [3/6]

PrimExpr tvm::sub ( const PrimExpr a,
int  b,
Span  span = Span() 
)
inline

◆ sub() [4/6]

PrimExpr tvm::sub ( float  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ sub() [5/6]

PrimExpr tvm::sub ( int  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ sub() [6/6]

PrimExpr tvm::sub ( PrimExpr  a,
PrimExpr  b,
Span  span = Span() 
)

subtraction operator

Parameters
aleft operand
bright operand
spanThe 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.

◆ sum()

PrimExpr tvm::sum ( PrimExpr  source,
Array< tir::IterVar axis,
Array< PrimExpr init = {},
Span  span = Span() 
)

sum 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.
spanThe location of this operation in the source.
Returns
The result.

◆ tan()

PrimExpr tvm::tan ( PrimExpr  x,
Span  span = Span() 
)
inline

◆ tanh()

PrimExpr tvm::tanh ( PrimExpr  x,
Span  span = Span() 
)
inline

◆ TerminalRenderer()

DiagnosticRenderer tvm::TerminalRenderer ( std::ostream &  ostream)

◆ trunc()

PrimExpr tvm::trunc ( PrimExpr  x,
Span  span = Span() 
)

Calculate trunc(x)

Parameters
xThe input expression.
spanThe location of this operation in the source.
Returns
The result expression.

◆ truncdiv() [1/3]

PrimExpr tvm::truncdiv ( const PrimExpr a,
int  b,
Span  span = Span() 
)
inline

◆ truncdiv() [2/3]

PrimExpr tvm::truncdiv ( int  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ truncdiv() [3/3]

PrimExpr tvm::truncdiv ( PrimExpr  a,
PrimExpr  b,
Span  span = Span() 
)

compute trunc(a / b)

This is the default integer division behavior in C.

Parameters
aleft operand
bright operand
spanThe 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/3]

PrimExpr tvm::truncmod ( const PrimExpr a,
int  b,
Span  span = Span() 
)
inline

◆ truncmod() [2/3]

PrimExpr tvm::truncmod ( int  a,
const PrimExpr b,
Span  span = Span() 
)
inline

◆ truncmod() [3/3]

PrimExpr tvm::truncmod ( PrimExpr  a,
PrimExpr  b,
Span  span = Span() 
)

compute the remainder of truncdiv

This is the default integer division behavior in C.

Parameters
aleft operand
bright operand
spanThe 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.

◆ VoidType()

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

◆ WithAttr() [1/3]

DictAttrs tvm::WithAttr ( DictAttrs  attrs,
const std::string &  key,
ObjectRef  value 
)
inline

◆ WithAttr() [2/3]

DictAttrs tvm::WithAttr ( DictAttrs  attrs,
String  key,
ObjectRef  value 
)

Copy the DictAttrs, but overrides a single attribute.

Parameters
attrsThe DictAttrs to update
keyThe update to insert or update.
valueThe new value of the attribute
Returns
The new DictAttrs with updated attributes.

◆ WithAttr() [3/3]

template<typename TFunc >
TFunc tvm::WithAttr ( TFunc  input,
const std::string &  attr_key,
ObjectRef  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.
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);
DictAttrs WithAttr(DictAttrs attrs, String key, ObjectRef value)
Copy the DictAttrs, but overrides a single attribute.

◆ WithAttrs() [1/2]

DictAttrs tvm::WithAttrs ( DictAttrs  attrs,
Map< String, ObjectRef new_attrs 
)

Copy the DictAttrs, but overrides attributes with the entries from attrs.

Parameters
attrsThe DictAttrs to update
new_attrsKey/values attributes to add to attrs.
Returns
The new DictAttrs with updated attributes.

◆ WithAttrs() [2/2]

template<typename TFunc >
TFunc tvm::WithAttrs ( TFunc  input,
Map< String, ObjectRef 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.
Returns
The new function or module with updated attributes.

◆ WithoutAttr() [1/2]

DictAttrs tvm::WithoutAttr ( DictAttrs  attrs,
const std::string &  key 
)

Copy the DictAttrs, but without a specific attribute.

Parameters
attrsThe DictAttrs to update
keyThe key to remove
Returns
The new DictAttrs with updated attributes.

◆ WithoutAttr() [2/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.
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");
DictAttrs WithoutAttr(DictAttrs attrs, const std::string &key)
Copy the DictAttrs, but without a specific attribute.

Variable Documentation

◆ kInvalidDeviceType

constexpr int tvm::kInvalidDeviceType = -1
constexpr

◆ kNullDeviceType

constexpr int tvm::kNullDeviceType = 0
constexpr

◆ kVirtualDevice

constexpr const char* tvm::kVirtualDevice = "virtual_device"
constexpr

brief The attribute key for the virtual device. This key will be promoted to first class on functions. For use in the parser and printer only.

Type: VirtualDevice

◆ NullOpt

constexpr runtime::NullOptType tvm::NullOpt {}
constexpr