1#pragma once
2
3#include <torch/csrc/jit/ir/ir.h>
4
5namespace torch {
6namespace jit {
7
8// Eliminates common inputs among `aten::cat` ops.
9TORCH_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.
13TORCH_API void ExpandConcatAndEliminateRedundancy(
14 const std::shared_ptr<Graph>& graph);
15
16TORCH_API bool CombineConcats(const std::shared_ptr<Graph>& graph);
17
18} // namespace jit
19} // namespace torch
20