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 | /*! |
20 | * \file tvm/node/node.h |
21 | * \brief Definitions and helper macros for IR/AST nodes. |
22 | * |
23 | * The node folder contains base utilities for IR/AST nodes, |
24 | * invariant of which specific language dialect. |
25 | * |
26 | * We implement AST/IR nodes as sub-classes of runtime::Object. |
27 | * The base class Node is just an alias of runtime::Object. |
28 | * |
29 | * Besides the runtime type checking provided by Object, |
30 | * node folder contains additional functionalities such as |
31 | * reflection and serialization, which are important features |
32 | * for building a compiler infra. |
33 | */ |
34 | #ifndef TVM_NODE_NODE_H_ |
35 | #define TVM_NODE_NODE_H_ |
36 | |
37 | #include <tvm/node/reflection.h> |
38 | #include <tvm/node/repr_printer.h> |
39 | #include <tvm/node/structural_equal.h> |
40 | #include <tvm/node/structural_hash.h> |
41 | #include <tvm/runtime/c_runtime_api.h> |
42 | #include <tvm/runtime/memory.h> |
43 | #include <tvm/runtime/object.h> |
44 | |
45 | #include <string> |
46 | #include <type_traits> |
47 | #include <utility> |
48 | #include <vector> |
49 | |
50 | namespace tvm { |
51 | |
52 | using runtime::Downcast; |
53 | using runtime::GetRef; |
54 | using runtime::make_object; |
55 | using runtime::Object; |
56 | using runtime::ObjectPtr; |
57 | using runtime::ObjectPtrEqual; |
58 | using runtime::ObjectPtrHash; |
59 | using runtime::ObjectRef; |
60 | using runtime::PackedFunc; |
61 | using runtime::TVMArgs; |
62 | using runtime::TVMRetValue; |
63 | using runtime::TypeIndex; |
64 | |
65 | } // namespace tvm |
66 | #endif // TVM_NODE_NODE_H_ |
67 | |