xref: /aosp_15_r20/external/pytorch/torch/csrc/jit/passes/dbr_quantization/remove_redundant_aliases.h (revision da0073e96a02ea20f0ac840b70461e3646d07c45)
1 #pragma once
2 
3 #include <torch/csrc/jit/api/module.h>
4 
5 namespace torch {
6 namespace jit {
7 
8 // This function replaces instances of
9 //
10 //   %b = aten::alias(%a)
11 //   %c = foo(%b)
12 //
13 // with
14 //
15 //   %c = foo(%a)
16 //
17 // on the module forward, if it's safe to do so.
18 TORCH_API Module DBRQuantRemoveRedundantAliases(Module& module);
19 
20 } // namespace jit
21 } // namespace torch
22