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