You are viewing a plain text version of this content. The canonical link for it is here.
Posted to discuss-archive@tvm.apache.org by 578881718 via Apache TVM Discuss <no...@discuss.tvm.ai> on 2022/06/19 15:13:31 UTC
[Apache TVM Discuss] [Questions] Why SimplifyInference use CreateFunctionPass to create Pass
hello,gays.
I read the tvm pass code, but i so confuse, the SimplifyInferencePass use the {MixedModeMutator} to rewrite graph expr{node}, and return a expr.
The {FunctionPassNode::operator()} loop the graph node , do pass for every node of graph. and restore the id:new_expr to update graph.
this pass{SimplifyInference}, add new nodes to graph and dependents input to connect to old graph but only return one expr. The {FunctionPassNode} only update one node to graph. So this Pass{SimplifyInference} maybe not update all node to IRModule.
Please help me to explain. Did I get it wrong?
---
[Visit Topic](https://discuss.tvm.apache.org/t/why-simplifyinference-use-createfunctionpass-to-create-pass/12979/1) to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/bf6ddc8b92ff73352d7fba72c17cf6e0f8c80af59cfb69d8e2c2603867179f83).
[Apache TVM Discuss] [Questions] Why SimplifyInference use CreateFunctionPass to create Pass
Posted by 578881718 via Apache TVM Discuss <no...@discuss.tvm.ai>.
yes,you are right. but SimplifyInferencePass ,this pass add some new node to the graph. but CreateFunctionPass just update one node of raw IRModule.
---
[Visit Topic](https://discuss.tvm.apache.org/t/why-simplifyinference-use-createfunctionpass-to-create-pass/12979/3) to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/10c0cff1f42fea08634fab4fd9a51d127b37f2a13129ce0987f444cce9114f2e).
[Apache TVM Discuss] [Questions] Why SimplifyInference use CreateFunctionPass to create Pass
Posted by Junru Shao via Apache TVM Discuss <no...@discuss.tvm.ai>.
Thanks for asking! If I understand correctly, `CreateFunctionPass` creates a pass that applies to every single Relay function in an IRModule, which means it won't miss any Function there
---
[Visit Topic](https://discuss.tvm.apache.org/t/why-simplifyinference-use-createfunctionpass-to-create-pass/12979/2) to respond.
You are receiving this because you enabled mailing list mode.
To unsubscribe from these emails, [click here](https://discuss.tvm.apache.org/email/unsubscribe/35650054022f5e9a074a627d7481e4116f1035e04ce8cfb355f83080f3d77520).