Make aot_module_simplified accept fake tensors
Strategy taken from voz's #89392 but my implementation strategy
is a bit different.
If a fake tensor is provided, we use its FakeTensorMode
(and more importantly, its ShapeEnv--this is what is tested
in the new unit test). Only one tensor needs to be fake;
if nothing is fake we just make a fresh mode as before.
Signed-off-by: Edward Z. Yang <ezyangfb.com>
ghstack-source-id: bf5dde0c209fd90ae70af018bb3924924456e096
Pull Request resolved: https://github.com/pytorch/pytorch/pull/89670