[JIT] Clone runOptimizations and similar functions for profiling executor. (#42656)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/42656
Thing change will allow us to more freely experiment with pass pipelines
in the profiling executor without affecting passes in the legacy
executor. Also, it somewhat helps to keep all passes in one place to be
able to tell what's going on.
Currently this change should not affect any behavior as I copied the
passes exactly as they've been invoked before, but we will probably want
to change these pipelines in a near future.
Test Plan: Imported from OSS
Reviewed By: bertmaher
Differential Revision: D22971050
Pulled By: ZolotukhinM
fbshipit-source-id: f5bb60783a553c7b51c5343eec7f8fe40037ff99
Author
Mikhail Zolotukhin