xref: /aosp_15_r20/external/pytorch/torch/csrc/jit/runtime/interpreter/preprocess_graph.h (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1 #pragma once
2 
3 #include <memory>
4 #include <unordered_map>
5 
6 #include <torch/csrc/jit/ir/ir.h>
7 
8 namespace torch::jit::interpreter {
9 
10 // pre-processing that happens once per graph
11 struct PreprocessGraph {
12   explicit PreprocessGraph(Graph& g);
13 
14   // Outputs of the preprocessing:
15   std::shared_ptr<Graph> graph;
16   std::unordered_map<Node*, bool> can_emit_inline;
17 };
18 
19 } // namespace torch::jit::interpreter
20