Created by: Xreki
In #9000, the basic Executor.Run
was split into two low-level functions, Executor.Prepare
and Executor.RunPreparedContext
. In Executor.Prepare
, operators are created in advance and saved in a ExecutorPrepareContext
. We can always call Executor.RunPreparedContext
to use the ExecutorPrepareContext
instead to avoid frequently creating and destroying of operators if there is no change to the program.
For inference, a high level Executor.Run is defined for direct use in C++ inference codes. We should also provide a corresponding high level Executor.RunPreparedContext
if users want to avoid the cost of frequently creating and destroying of operators.