Delay verify correctness wrapping to call site.
There is only one call site for compiler_fn, so we can safely delay
wrapping verify correctness to here. This will help later when we
change the backend compiler calling convention to pass fake tensors
(but I need to pass real tensors here.)
This is adapted from voz's changes at https://github.com/pytorch/pytorch/pull/89392
but with less changes to the substantive logic. I only moved the relevant
inner implementation; there are no changes otherwise.
Signed-off-by: Edward Z. Yang <ezyangfb.com>
ghstack-source-id: 166fb03cfcb13c181bd9bfa095dfb80353ee2242
Pull Request resolved: https://github.com/pytorch/pytorch/pull/89662