2. Expressions for Operators¶
We start from operators. As you may know, operators are the building blocks of neural network models. A deep neural network can be expressed as a Directed Acyclic Graph (DAG), which consists of nodes being the operators and edges being the data dependency between nodes. Being able to execute the operators efficiently is of course a necessity to high-performance neural network model execution.
In Section 1.2 you have seen how to build the vector addition expression in TVM. This chapter covers more concepts in TVM to construct expressions. Specifically, you’ll learn about data types, shapes, indexing, reduction and control flow, based on which you’ll be able to construct operators in the next chapter.
- 2.1. Data Types
- 2.2. Shapes
- 2.3. Index and Shape Expressions
- 2.4. Reduction Operations
- 2.5. Conditional Expression:
- 2.6. Truth Value Testing: