Skip to main content

tvm_tirx/
ir.rs

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//! The IR shared by every dialect. Expressions ([`Expr`]), statements ([`Stmt`]) and types
21//! ([`Type`]) are the three node hierarchies; functions are expressions, and an [`IRModule`] binds
22//! them to global names, the unit of compilation that the passes of [`transform`] rewrite.
23
24// An object registered under `ir` that no file has a block for yet is generated here, to be moved
25// to the file of the Python module that defines it.
26// tvm-ffi-stubgen(file): mod(missing_docs = allow, prefix = ir)
27// `ir.Op` is hand-written in `op.rs`.
28// tvm-ffi-stubgen(object): ir.Op(skip)
29
30pub mod attrs;
31pub mod base;
32pub mod dtype;
33pub mod expr;
34pub mod function;
35pub mod global_info;
36pub mod location;
37pub mod module;
38pub mod op;
39pub mod op_def;
40pub mod prim;
41pub mod stmt;
42pub(crate) mod support;
43pub mod transform;
44pub mod r#type;
45pub mod type_def;
46pub mod unique_name_supply;
47
48pub use attrs::*;
49pub use base::*;
50pub use expr::*;
51pub use function::*;
52pub use global_info::*;
53pub use location::*;
54pub use module::*;
55pub use op::*;
56pub use op_def::*;
57pub use stmt::*;
58pub use r#type::*;
59pub use type_def::*;
60pub use unique_name_supply::*;
61
62// tvm-ffi-stubgen(begin): import-section
63// tvm-ffi-stubgen(end)