[FX] Make Graphs immutable and make GraphModule recompile after assigning graph (#44830)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/44830
Test Plan: Imported from OSS
Reviewed By: zdevito
Differential Revision: D23743850
Pulled By: jamesr66a
fbshipit-source-id: 501b92a89ff636c26abeff13105a75462384554c