1 | #pragma once |
2 | |
3 | #include <torch/csrc/jit/ir/ir.h> |
4 | |
5 | namespace torch { |
6 | namespace jit { |
7 | |
8 | // Eliminates common inputs among `aten::cat` ops. |
9 | TORCH_API bool EliminateConcatCommonInputs(const std::shared_ptr<Graph>& graph); |
10 | |
11 | // Expands `aten::cat` ops into `aten::copy` ops and eliminates redudancies |
12 | // in the buffers used for concatenation if possible. |
13 | TORCH_API void ExpandConcatAndEliminateRedundancy( |
14 | const std::shared_ptr<Graph>& graph); |
15 | |
16 | TORCH_API bool CombineConcats(const std::shared_ptr<Graph>& graph); |
17 | |
18 | } // namespace jit |
19 | } // namespace torch |
20 | |