3 #include <torch/csrc/jit/argument_spec.h> 4 #include <torch/csrc/jit/autodiff.h> 5 #include <torch/csrc/jit/interpreter.h> 6 #include <torch/csrc/jit/ir.h> 7 #include <torch/csrc/jit/variable_tensor_list.h> 13 struct GraphExecutorState;
20 const Graph* graph =
nullptr;
24 const Graph* graph =
nullptr;
26 std::unordered_map<ArgumentSpec, ExecutionPlanState> execution_plans;
32 GraphExecutor(std::shared_ptr<Graph> graph,
bool optimize =
true);
33 void run(Stack& inputs);
34 explicit operator bool()
const {
35 return pImpl !=
nullptr;
37 std::shared_ptr<Graph> graph()
const;
38 std::shared_ptr<Graph> graphFor(
const Stack& inputs)
const;
40 void debugDisableAutodiffSubgraphInlining();
43 std::shared_ptr<GraphExecutorImpl> pImpl;
48 TORCH_API
void runRequiredPasses(
const std::shared_ptr<Graph>& g);