xref: /aosp_15_r20/external/pytorch/torch/csrc/jit/passes/replacement_of_old_operators.h (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1 #pragma once
2 
3 #include <torch/csrc/jit/ir/ir.h>
4 
5 namespace torch::jit {
6 
7 // Find the valid upgrader graph for the upgrader and cache the result
8 // for later lookups. Will error out if there is no valid upgrader graph
9 // provided for the upgrader name.
10 std::shared_ptr<Graph> getUpgraderGraph(const std::string& upgrader_name);
11 
12 TORCH_API void ReplaceOldOperatorsWithUpgraders(std::shared_ptr<Graph> graph);
13 
14 } // namespace torch::jit
15