24 #ifndef TVM_IR_AFFINE_TYPE_H_
25 #define TVM_IR_AFFINE_TYPE_H_
44 static constexpr
const char*
_type_key =
"AffineType";
78 v->Visit(
"scale", &
scale);
80 v->Visit(
"dtype", &
dtype);
81 v->Visit(
"axis", &
axis);
85 equal->MarkGraphNode();
98 static constexpr
const char*
_type_key =
"TensorAffineType";
125 equal->MarkGraphNode();
134 static constexpr
const char*
_type_key =
"TupleAffineType";
AffineType representation.
Definition: affine_type.h:36
TVM_DECLARE_BASE_OBJECT_INFO(AffineTypeNode, Object)
static constexpr const bool _type_has_method_shash_reduce
Definition: affine_type.h:46
Span span
Span that points to the original source code. Reserved debug information.
Definition: affine_type.h:42
static constexpr const bool _type_has_method_sequal_reduce
Definition: affine_type.h:45
static constexpr const char * _type_key
Definition: affine_type.h:44
Managed reference to AffineTypeNode.
Definition: affine_type.h:54
TVM_DEFINE_OBJECT_REF_METHODS(AffineType, ObjectRef, AffineTypeNode)
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
Managed reference to RelayExprNode.
Definition: expr.h:442
A Reducer class to reduce the structural equality result of two objects.
Definition: structural_equal.h:137
virtual void MarkGraphNode()=0
Mark current comparison as graph node in hashing. Graph node hash will depends on the graph structure...
A Reducer class to reduce the structural hash value.
Definition: structural_hash.h:121
Definition: source_map.h:120
TensorAffineType representation.
Definition: affine_type.h:66
TVM_DECLARE_BASE_OBJECT_INFO(TensorAffineTypeNode, AffineTypeNode)
void SHashReduce(SHashReducer hash_reduce) const
Definition: affine_type.h:90
void VisitAttrs(tvm::AttrVisitor *v)
Definition: affine_type.h:77
RelayExpr zero_point
The zero point of this type.
Definition: affine_type.h:71
int axis
The axis for per-channel quantization.
Definition: affine_type.h:75
RelayExpr scale
The scale of this type.
Definition: affine_type.h:69
bool SEqualReduce(const TensorAffineTypeNode *other, SEqualReducer equal) const
Definition: affine_type.h:84
DataType dtype
The data type of this type.
Definition: affine_type.h:73
static constexpr const char * _type_key
Definition: affine_type.h:98
Managed reference to AffineTypes.
Definition: affine_type.h:106
TensorAffineType(RelayExpr scale, RelayExpr zero_point, DataType dtype, int axis)
TVM_DEFINE_OBJECT_REF_METHODS(TensorAffineType, AffineType, TensorAffineTypeNode)
TupleAffineType representation.
Definition: affine_type.h:117
Array< TensorAffineType > types
The types of this tuple.
Definition: affine_type.h:120
bool SEqualReduce(const TupleAffineTypeNode *other, SEqualReducer equal) const
Definition: affine_type.h:124
void SHashReduce(SHashReducer hash_reduce) const
Definition: affine_type.h:129
TVM_DECLARE_BASE_OBJECT_INFO(TupleAffineTypeNode, AffineTypeNode)
void VisitAttrs(tvm::AttrVisitor *v)
Definition: affine_type.h:122
static constexpr const char * _type_key
Definition: affine_type.h:134
Managed reference to TupleAffineTypes.
Definition: affine_type.h:142
TVM_DEFINE_OBJECT_REF_METHODS(TupleAffineType, AffineType, TupleAffineTypeNode)
TupleAffineType(Array< TensorAffineType > types)
Array, container representing a contiguous sequence of ObjectRefs.
Definition: array.h:289
Runtime primitive data type.
Definition: data_type.h:43
Base class of all object reference.
Definition: object.h:519
base class of all object containers.
Definition: object.h:171
IR/AST nodes for the unified type system in TVM.
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
PrimExpr equal(PrimExpr a, PrimExpr b, Span span=Span())
equal