Add a pass to replace memory_format ops
Summary:
The goal is to replace aten ops which takes torch.memory_format as an argument with edge dialect ops with instead takes dim_order.
This is towards the larger goal to move away from memory_format to dim_order.
Pending items for AOT:
* Not running the pass yet, but plan to run it through `to_edge()`
* Not implemented all the ops which consumes memory format yet like,
* torch.clone
* tensor.full_like
* Serialization - once this is done, need to remove support for memory_format altogether [BC breaking]
Reviewed By: larryliu0820
Differential Revision: D48195055
fbshipit-source-id: 5c623a6914043da80069e27d8094c5f3ce398c06 D
Digant Desai committed
d1dd975f2f4e9a100e17ec2206c588ac563b25e0
Parent: 1ac53ee
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
on 8/10/2023, 7:08:49 PM