Where to find graph optimization in tvm?


#1

Currently, I am learning how tvm to do some optimization on the level of graph. However, when I am reading the code I found TVM has some levels of optimization like const fold and reduce sub expression. But these codes are related to the specific language tvm creates, it is on the level of optimization on programming languages. So I am really confused about where can I find how tvm make optimization on the graph, like merging some operators. Thanks!


#2

You are talking about operator fusion, please refer to this file:

You can find all the Relay related optimization passes (including graph level ones) under this folder:


#3

Thank you so much. It really helps!