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 Luke Hutton via Apache TVM Discuss <no...@discuss.tvm.ai> on 2022/02/16 12:19:52 UTC

[Apache TVM Discuss] [Questions] Difference between MixedModeMutator and ExprRewriter


Hi,

I've been looking at types of Relay pass recently and got a bit confused when it comes to `MixedModeMutator` and when it should be used over `ExprRewriter`. The RFC (https://discuss.tvm.apache.org/t/performing-relay-passes-non-recursively/5696) seems to me to suggest that `ExprRewriter` should be used when wanting to mutate a graph non-recursively, yet I can see many uses of `MixedModeMutator` in the codebase for seemingly a similar reason. Therefore, I'm wondering if/what the difference is between `MixedModeMutator` and `ExprRewriter`, and when one should be used over the other?

cc @mbrookhart @tqchen @manupa-arm





---
[Visit Topic](https://discuss.tvm.apache.org/t/difference-between-mixedmodemutator-and-exprrewriter/12102/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/eea5af9241b539b5b05d05c13ba5a1ac441a994491ca8e439dc3a7495a787c05).

[Apache TVM Discuss] [Questions] Difference between MixedModeMutator and ExprRewriter

Posted by Luke Hutton via Apache TVM Discuss <no...@discuss.tvm.ai>.

Thanks @mbrookhart, this is what I suspected :)





---
[Visit Topic](https://discuss.tvm.apache.org/t/difference-between-mixedmodemutator-and-exprrewriter/12102/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/9585cec17b85b82feb27c2787ccb35d3f7141af1dd36d68e5fe93fe21ccb9be3).

[Apache TVM Discuss] [Questions] Difference between MixedModeMutator and ExprRewriter

Posted by Matthew Brookhart via Apache TVM Discuss <no...@discuss.tvm.ai>.

Hi @lhutton1. That was the intention (it's somewhat safer to do a dataflow transformation without access to recursion at all), but MixedMode* was introduced well after TVM became a mature project, and it seems like most people prefer using the MixedModMutator directly, since the API is closer to ExprMutator.





---
[Visit Topic](https://discuss.tvm.apache.org/t/difference-between-mixedmodemutator-and-exprrewriter/12102/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/e48d74c85dbb8ea9a010e10377b162b0d019b8c1142305ea99e05ef92917fdaf).