24 #ifndef TVM_TE_TENSOR_INTRIN_H_
25 #define TVM_TE_TENSOR_INTRIN_H_
75 v->Visit(
"name", &
name);
77 v->Visit(
"inputs", &
inputs);
80 v->Visit(
"body", &
body);
85 static constexpr
const char*
_type_key =
"TensorIntrin";
120 v->Visit(
"intrin", &
intrin);
127 static constexpr
const char*
_type_key =
"TensorIntrinCall";
Symbolic n-dimensional array, to represent a memory buffer.
Visitor class to get the attributes of an AST/IR node. The content is going to be called for each fie...
Definition: reflection.h:52
Array, container representing a contiguous sequence of ObjectRefs.
Definition: array.h:289
Base class of all object reference.
Definition: object.h:517
base class of all object containers.
Definition: object.h:169
Operation that produces tensors.
Definition: tensor.h:47
Definition: tensor_intrin.h:101
TVM_DECLARE_FINAL_OBJECT_INFO(TensorIntrinCallNode, Object)
Array< IterVar > reduce_axis
IterVar on each reduction axis, if the intrin will use the reduce axis.
Definition: tensor_intrin.h:114
Array< Region > regions
regions of input tensors
Definition: tensor_intrin.h:108
Array< PrimExpr > scalar_inputs
scalar expression inputs
Definition: tensor_intrin.h:117
Array< Tensor > tensors
input tensors of the intrinsic
Definition: tensor_intrin.h:106
void VisitAttrs(AttrVisitor *v)
Definition: tensor_intrin.h:119
static constexpr const char * _type_key
Definition: tensor_intrin.h:127
TensorIntrin intrin
the tensor intrinsic
Definition: tensor_intrin.h:104
Managed reference to TensorIntrinCallNode.
Definition: tensor_intrin.h:135
TVM_DEFINE_OBJECT_REF_METHODS(TensorIntrinCall, ObjectRef, TensorIntrinCallNode)
TensorIntrinCall(TensorIntrin intrin, Array< Tensor > tensors, Array< Region > regions, Array< IterVar > reduce_axis, Array< PrimExpr > scalar_inputs)
Node to represent a Tensor intrinsic operator.
Definition: tensor_intrin.h:36
void VisitAttrs(AttrVisitor *v)
Definition: tensor_intrin.h:74
Array< Buffer > buffers
Symbolic buffers of each output/input tensor buffers[0:len(inputs)] are buffers of the inputs....
Definition: tensor_intrin.h:53
Operation op
The operation this intrinsics is carrying out.
Definition: tensor_intrin.h:41
static constexpr const char * _type_key
Definition: tensor_intrin.h:85
Stmt reduce_init
Special statement for reduction op, can be None reset the value of output buffer to identity value.
Definition: tensor_intrin.h:65
Stmt reduce_update
Special statement for reduction op, can be None Reduce: do a reduction of current output buffer with ...
Definition: tensor_intrin.h:70
Array< Var > scalar_params
List of scalar variables, used in body. These placeholders will be bound to expressions passed in whe...
Definition: tensor_intrin.h:58
Stmt body
The normal statement to execute the intrinsic.
Definition: tensor_intrin.h:60
TVM_DECLARE_FINAL_OBJECT_INFO(TensorIntrinNode, Object)
Array< Tensor > inputs
List of inputs of operator, placeholder in postdfs order.
Definition: tensor_intrin.h:43
std::string name
The name of the intrinsic.
Definition: tensor_intrin.h:39
TensorIntrinNode()
constructor
Definition: tensor_intrin.h:72
Managed reference to TensorIntrinNode.
Definition: tensor_intrin.h:93
TVM_DEFINE_OBJECT_REF_METHODS(TensorIntrin, ObjectRef, TensorIntrinNode)
TensorIntrin(std::string name, Operation op, Array< Tensor > inputs, Array< Buffer > buffers, Array< Var > scalar_params, Stmt body, Stmt reduce_init, Stmt reduce_update)
Container of all statements.
Definition: stmt.h:59
IterVar reduce_axis(Range dom, std::string name="rv")
Create a new IterVar for reduction operations.
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36