Add lift constant tensors passes after aten_to_edge (#359)
Summary: X-link: https://github.com/pytorch/pytorch/pull/109382 Pull Request resolved: https://github.com/pytorch/executorch/pull/359 When exporting using enable_aot (through the torch.export path), we want to lift all constant tensors as buffers to the exported program. The ScalarToTensor pass in EXIR's aten_to_edge passes will create some constant tensors in the graph, so we will need to run a lift_constant_tensors pass afterwards. Note that this only needs to be applied when exporting using the torch.export path because in the original path, nothing is lifted. Reviewed By: cccclai Differential Revision: D49207492 fbshipit-source-id: 971c44d109b41de8b3f9ff0565fd39bdd3a17b9f
A
Angela Yi committed
e03bd6c0ae587464247bca610d0990efc57a0dc6
Parent: 49d2e68
Committed by Facebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
on 9/19/2023, 1:26:22 AM