mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/65963 ghstack-source-id: 141425517 Test Plan: In next diff. Reviewed By: qihqi, cccclai Differential Revision: D31326150 fbshipit-source-id: dbbf65f2bf14846c45d0add71edc7d4dbfc6b92c
30 lines
722 B
C++
30 lines
722 B
C++
#pragma once
|
|
|
|
#include <vector>
|
|
|
|
#include <ATen/core/ivalue.h>
|
|
#include <ATen/core/operator_name.h>
|
|
#include <torch/csrc/jit/runtime/instruction.h>
|
|
|
|
namespace torch {
|
|
namespace jit {
|
|
namespace mobile {
|
|
|
|
using Stack = std::vector<c10::IValue>;
|
|
using DebugHandle = int64_t;
|
|
|
|
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-member-init)
|
|
struct Code {
|
|
std::vector<Instruction> instructions_;
|
|
std::vector<DebugHandle> debug_handles_;
|
|
std::vector<c10::OperatorName> op_names_;
|
|
std::vector<std::function<void(Stack&)>> operators_;
|
|
std::vector<c10::IValue> constants_;
|
|
std::vector<c10::TypePtr> types_;
|
|
size_t register_size_; // Aggregated output size.
|
|
};
|
|
|
|
} // namespace mobile
|
|
} // namespace jit
|
|
} // namespace torch
|