Change aot_module_simplified to take take arguments directly
This is extracted from voz's #89392
Previously, the implementation did some half-assed caching where it
returned a callable, that when invoked for the first time, actually
performed the compilation. Delaying the compilation like this...
seems totally unnecessary? To make matters worse, this has cost
(we have to check if we hit the cache) and unsound (because the
compiled function may not be valid for other arguments.)
So instead, we ask user to provide arguments, and compile everything
immediately.
Signed-off-by: Edward Z. Yang <ezyangfb.com>
ghstack-source-id: 49f39c564e44326394de207ff777a92595a038a8
Pull Request resolved: https://github.com/pytorch/pytorch/pull/89669