Unify invoking JIT operands (#57850)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/57850
What I envision is a modular decomposed code, with separate steps which each consume/produce Futures, and which can be chained together to obtain the desired results. One common "starting point" for these chains is the execution of a remote function (Python or JIT or otherwise). I'm thus creating a helper function for one of these, the JIT operators (by deduplicating the places where we used to run them). More will follow.
This deduplication will also help to add CUDA support to JIT RPC, since the execution of the JIT function/operators is where we need to set our custom streams.
ghstack-source-id: 129567058
Test Plan: CI
Reviewed By: mrshenli
Differential Revision: D28253847
fbshipit-source-id: 24ab67ad89c8796861e9bbcb78878b26704c0c48