tvm
Classes | Namespaces | Macros | Functions
op.h File Reference

Primitive operators(builtin intrinsics) and registry for them. More...

#include <dmlc/registry.h>
#include <tvm/ir/attrs.h>
#include <tvm/ir/expr.h>
#include <tvm/ir/type.h>
#include <tvm/ir/type_relation.h>
#include <tvm/node/attr_registry_map.h>
#include <tvm/runtime/registry.h>
#include <string>
#include <utility>
#include <vector>
Include dependency graph for op.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  tvm::OpNode
 Primitive Op(builtin intrinsics) More...
 
class  tvm::Op
 Managed reference class to OpNode. More...
 
class  tvm::OpRegEntry
 Helper structure to register operators. More...
 
class  tvm::OpAttrMap< ValueType >
 Map<Op,ValueType> used to store meta-information about Op. More...
 

Namespaces

 tvm
 runtime implementation for LibTorch/TorchScript.
 

Macros

#define TVM_OP_REGISTER_VAR_DEF   static DMLC_ATTRIBUTE_UNUSED ::tvm::OpRegEntry& __make_##Op
 
#define TVM_REGISTER_OP(OpName)
 Register a new operator, or set attribute of the corresponding op. More...
 

Functions

bool tvm::IsPrimitiveOp (const RelayExpr &expr)
 Check that an expression is a "primitive operator". More...
 

Detailed Description

Primitive operators(builtin intrinsics) and registry for them.

Macro Definition Documentation

◆ TVM_OP_REGISTER_VAR_DEF

#define TVM_OP_REGISTER_VAR_DEF   static DMLC_ATTRIBUTE_UNUSED ::tvm::OpRegEntry& __make_##Op

◆ TVM_REGISTER_OP

#define TVM_REGISTER_OP (   OpName)
Value:
static OpRegEntry & RegisterOrGet(const String &name)
Register or get a new entry.
OpRegEntry & set_name()
Definition: op.h:285
#define TVM_OP_REGISTER_VAR_DEF
Definition: op.h:341
#define TVM_STR_CONCAT(__x, __y)
Definition: object.h:715

Register a new operator, or set attribute of the corresponding op.

Parameters
OpNameThe name of registry
.describe("add two inputs together")
.set_num_inputs(2)
.set_attr<OpKernel>("gpu_kernel", AddKernel);
#define TVM_REGISTER_OP(OpName)
Register a new operator, or set attribute of the corresponding op.
Definition: op.h:358