-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Open
Labels
module: inductoroncall: pt2triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module
Description
The pattern matcher assumes by default that it is safe to run functional passes on the replacement graph. The ones it runs are DCE and remove_noop_ops. We should try to change it to be more automatic and determine if those passes are safe to run (or add invariants if this is too hard, see also #133250).
This is non-trivial:
- For DCE we can check if there are any mutable ops. If there are, then it's probably a bad idea to DCE
- For remove_noop_ops -- this is trickier. We cannot remove intermediate clones if they end up changing the alias relationship between the outputs and the inputs of the replacement graph.
cc @ezyang @chauhang @penguinwu @voznesenskym @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @ColinPeppler @amjames @desertfire
Metadata
Metadata
Assignees
Labels
module: inductoroncall: pt2triagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate moduleThis issue has been looked at a team member, and triaged and prioritized into an appropriate module