tvm
type.h
Go to the documentation of this file.
1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one
3  * or more contributor license agreements. See the NOTICE file
4  * distributed with this work for additional information
5  * regarding copyright ownership. The ASF licenses this file
6  * to you under the Apache License, Version 2.0 (the
7  * "License"); you may not use this file except in compliance
8  * with the License. You may obtain a copy of the License at
9  *
10  * http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing,
13  * software distributed under the License is distributed on an
14  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15  * KIND, either express or implied. See the License for the
16  * specific language governing permissions and limitations
17  * under the License.
18  */
19 
24 #ifndef TVM_RELAY_TYPE_H_
25 #define TVM_RELAY_TYPE_H_
26 
27 #include <tvm/ir/attrs.h>
28 #include <tvm/ir/env_func.h>
29 #include <tvm/ir/tensor_type.h>
30 #include <tvm/ir/type.h>
31 #include <tvm/ir/type_relation.h>
32 #include <tvm/runtime/registry.h>
33 #include <tvm/tir/expr.h>
34 
35 #include <string>
36 
37 #include "base.h"
38 
39 namespace tvm {
40 namespace relay {
41 
42 // namespace update for backward compact
43 // will be removed later.
46 using Kind = TypeKind;
47 using Type = tvm::Type;
72 
73 } // namespace relay
74 } // namespace tvm
75 #endif // TVM_RELAY_TYPE_H_
Function type.
Definition: type.h:436
Managed reference to FuncTypeNode.
Definition: type.h:481
A global type variable that is used for defining new types or type aliases.
Definition: type.h:299
Managed reference to GlobalTypeVarNode.
Definition: type.h:333
Intermediate values that is used to indicate incomplete type during type inference.
Definition: type.h:508
Managed reference to IncompleteTypeNode.
Definition: type.h:532
Reference Type High-level Relay IR.
Definition: type.h:549
Managed reference to RelayRefTypeNode.
Definition: type.h:577
This is the most commonly used type in relay. TensorType have a fixed dimension, data type.
Definition: tensor_type.h:61
Managed reference to TensorTypeNode.
Definition: tensor_type.h:99
The type of tuple values.
Definition: type.h:350
Managed reference to TupleTypeNode.
Definition: type.h:376
Type function application.
Definition: type_relation.h:40
Managed reference to TypeCallNode.
Definition: type_relation.h:72
Potential Constraints in a function.
Definition: type.h:412
Managed reference to TypeConstraintNode.
Definition: type.h:423
Type is the base type of all types.
Definition: type.h:74
User defined type relation, it is an input-output relation on types.
Definition: type_relation.h:185
Managed reference to TypeRelationNode.
Definition: type_relation.h:228
reporter that reports back to the type resolution information.
Definition: type_relation.h:88
Container class of TypeReporter.
Definition: type_relation.h:145
Type parameter in functions.
Definition: type.h:248
Managed reference to TypeVarNode.
Definition: type.h:282
Managed reference to TypeNode.
Definition: type.h:93
Any shape.
Definition: expr.h:1104
Managed reference to AnyNode.
Definition: expr.h:1131
Serializable global function used in IR.
Helpers for attribute objects.
IR/AST nodes for the unified type system in TVM.
tvm::RelayRefType RelayRefType
Definition: type.h:61
tvm::GlobalTypeVar GlobalTypeVar
Definition: type.h:51
tvm::IncompleteType IncompleteType
Definition: type.h:59
tvm::IncompleteTypeNode IncompleteTypeNode
Definition: type.h:60
tvm::TensorType TensorType
Definition: type.h:63
tvm::TypeConstraintNode TypeConstraintNode
Definition: type.h:56
tvm::TypeVar TypeVar
Definition: type.h:49
tvm::tir::AnyNode AnyNode
Definition: type.h:44
tvm::TypeConstraint TypeConstraint
Definition: type.h:55
tvm::Type Type
Definition: type.h:47
tvm::TypeRelationNode TypeRelationNode
Definition: type.h:68
tvm::TupleTypeNode TupleTypeNode
Definition: type.h:54
tvm::GlobalTypeVarNode GlobalTypeVarNode
Definition: type.h:52
tvm::FuncType FuncType
Definition: type.h:57
tvm::TypeReporterNode TypeReporterNode
Definition: type.h:71
tvm::TypeVarNode TypeVarNode
Definition: type.h:50
tvm::TypeCall TypeCall
Definition: type.h:65
tvm::FuncTypeNode FuncTypeNode
Definition: type.h:58
tvm::tir::Any Any
Definition: type.h:45
tvm::TupleType TupleType
Definition: type.h:53
tvm::TensorTypeNode TensorTypeNode
Definition: type.h:64
tvm::TypeRelation TypeRelation
Definition: type.h:67
tvm::RelayRefTypeNode RelayRefTypeNode
Definition: type.h:62
tvm::TypeCallNode TypeCallNode
Definition: type.h:66
tvm::TypeNode TypeNode
Definition: type.h:48
tvm::TypeReporter TypeReporter
Definition: type.h:70
runtime implementation for LibTorch/TorchScript.
Definition: analyzer.h:36
TypedEnvFunc< bool(const Array< Type > &args, int num_inputs, const Attrs &attrs, const TypeReporter &reporter)> TypeRelationFn
User defined type constraint function.
Definition: type_relation.h:175
TypeKind
Possible kinds of TypeVars.
Definition: type.h:201
This file defines the TVM global function registry.
Polymorphic tensor types.
TIR expressions.
Type relation and function for type inference(checking).