pytorch/torch/csrc/jit/passes/concat_opt.h
cyy c764ef6d53 [9/N] Fix clang-tidy warnings in jit (#132010)
Follows  #131997

Co-authored-by: Aaron Gokaslan <aaronGokaslan@gmail.com>
Pull Request resolved: https://github.com/pytorch/pytorch/pull/132010
Approved by: https://github.com/Skylion007
2024-07-29 18:38:35 +00:00

18 lines
525 B
C++

#pragma once
#include <torch/csrc/jit/ir/ir.h>
namespace torch::jit {
// Eliminates common inputs among `aten::cat` ops.
TORCH_API bool EliminateConcatCommonInputs(const std::shared_ptr<Graph>& graph);
// Expands `aten::cat` ops into `aten::copy` ops and eliminates redudancies
// in the buffers used for concatenation if possible.
TORCH_API void ExpandConcatAndEliminateRedundancy(
const std::shared_ptr<Graph>& graph);
TORCH_API bool CombineConcats(const std::shared_ptr<Graph>& graph);
} // namespace torch::jit