1 #pragma once 2 #include <c10/util/Flags.h> 3 #include <torch/csrc/jit/api/module.h> 4 #include <torch/csrc/jit/runtime/graph_executor_impl.h> 5 6 namespace torch::jit { 7 8 struct TORCH_API SimpleGraphExecutorImpl : public GraphExecutorImplBase { 9 SimpleGraphExecutorImpl( 10 const std::shared_ptr<Graph>& graph, 11 std::string function_name); 12 13 const ExecutionPlan& getPlanFor( 14 Stack& stack, 15 std::optional<size_t> remaining_bailout_depth) override; 16 GraphExecutorState getDebugState() override; 17 ~SimpleGraphExecutorImpl() override = default; 18 19 private: 20 std::optional<ExecutionPlan> execution_plan_; 21 }; 22 23 } // namespace torch::jit 24