#pragma once #include #include #include namespace torch::jit::mobile { struct InterpreterState { TORCH_API explicit InterpreterState(const Code& code); TORCH_API bool run(Stack& stack); private: void enterFrame(const Code&); void leaveFrame(); void saveExceptionDebugHandles(); void callFunction(torch::jit::Function& f, Stack& stack); c10::IValue& reg(size_t reg); std::vector registers_; std::vector frames_; }; const std::vector& getInterpretersExceptionDebugHandles(); } // namespace torch::jit::mobile