I have a very basic question about the application of Relay Passes. Every Relay-Pass has a PassInfo defining the name, optimization_level and other required paths.
When using the PassContext like in this very simple example:
target = tvm.target.Target("llvm", host="llvm")
dev = tvm.cpu(0)
with tvm.transform.PassContext(opt_level=3):
lib = relay.build(mod, target=target, params=params)
Is there a standard portfolio of Relay-Passes that is applied (e.g. Constant Folding, OperatorFusion, etc.)?
How are the related Relay-Compiler Passes selected? I guess there might be a few options, but I did not find any description about it yet.
- Are no Relay-passes applied automatically at all?
- Are all Relay-passes applied which are registered an match the optimization level?
- Is there a list of default Relay-Passes that are applied when using the PassContext? If yes, where is it specified. I did not find this step in the code yet.
I already red a few articles in the documantation of TVM about the Relay-Pass-Infrastructure but I did not find any information regarding this topic.
I would really appreciate if someone could help me to understand the application mechanism.