#pragma once #include namespace torch { namespace jit { struct ProfilingGraphExecutorImpl : public GraphExecutorImplBase { ProfilingGraphExecutorImpl(const std::shared_ptr& graph); ExecutionPlan getPlanFor(Stack& stack) override; GraphExecutorState getDebugState() override; ~ProfilingGraphExecutorImpl() override = default; private: std::shared_ptr prepareGraph( const std::shared_ptr& graph, Stack& stack); std::unique_ptr pr_; c10::optional profiling_plan_; // plan to run in order to profiling the code c10::optional optimized_plan_; ArgumentSpecCreator arg_spec_creator_; }; } // namespace jit } // namespace torch