xref: /aosp_15_r20/external/pytorch/torch/csrc/jit/passes/normalize_ops.h (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1 #pragma once
2 
3 #include <torch/csrc/jit/ir/ir.h>
4 
5 namespace torch::jit {
6 
7 // This pass converts aten ops to a normalized form. It is
8 // run immediately after IR generation in both the tracer and compiler,
9 // so downstream consumers of the IR do not need handle ops in their
10 // pre-normalized form.
11 // Currently only handles normalization of op aliases.
12 TORCH_API void NormalizeOps(const std::shared_ptr<Graph>& graph);
13 
14 const std::unordered_map<Symbol, Symbol>& getOperatorAliasMap();
15 
16 } // namespace torch::jit
17