xref: /aosp_15_r20/external/pytorch/torch/csrc/jit/passes/onnx/pattern_conversion/common.h (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1 #pragma once
2 
3 #include <torch/csrc/jit/ir/ir.h>
4 
5 // Functions used by both encapsulation and conversion.
6 
7 namespace torch {
8 namespace jit {
9 
10 struct IndexingPatternFinder {
11  public:
12   static std::vector<Node*> FetchSliceAndSelect(const Node* node);
13 
14  private:
15   static bool IsSameSource(const Node* n, const Node* m);
16 };
17 
18 } // namespace jit
19 } // namespace torch
20