mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 12:54:11 +08:00
This is follow-up of #164912 to mark unused C++ parameters to improve code readability. Pull Request resolved: https://github.com/pytorch/pytorch/pull/165121 Approved by: https://github.com/Skylion007
27 lines
647 B
C++
27 lines
647 B
C++
#pragma once
|
|
|
|
#include <vector>
|
|
|
|
#include <torch/csrc/jit/mobile/code.h>
|
|
#include <torch/csrc/jit/mobile/frame.h>
|
|
|
|
namespace torch::jit::mobile {
|
|
|
|
struct InterpreterState {
|
|
TORCH_API explicit InterpreterState(const Code& code);
|
|
TORCH_API bool run(Stack& stack);
|
|
|
|
private:
|
|
void enterFrame(const Code& /*code*/);
|
|
void leaveFrame();
|
|
void saveExceptionDebugHandles();
|
|
void callFunction(torch::jit::Function& f, Stack& stack);
|
|
|
|
c10::IValue& reg(size_t reg);
|
|
std::vector<c10::IValue> registers_;
|
|
std::vector<Frame> frames_;
|
|
};
|
|
|
|
const std::vector<DebugHandle>& getInterpretersExceptionDebugHandles();
|
|
} // namespace torch::jit::mobile
|