1 #pragma once 2 3 #include <torch/csrc/jit/ir/ir.h> 4 5 namespace torch::jit { 6 7 // return true if graph is modified 8 TORCH_API bool PeepholeOptimize( 9 const std::shared_ptr<Graph>& graph, 10 bool disable_shape_peepholes = false); 11 // return true if graph is modified 12 TORCH_API bool PeepholeOptimize( 13 Block* block, 14 bool disable_shape_peepholes = false); 15 // return true if graph is modified 16 TORCH_API bool FuseAddMM(const std::shared_ptr<Graph>& graph); 17 18 } // namespace torch::jit 19