1 | #pragma once |
---|---|
2 | |
3 | #include <torch/csrc/jit/ir/ir.h> |
4 | |
5 | namespace torch { |
6 | namespace jit { |
7 | |
8 | // This pass removes 'grad_of' nodes, replacing them with conditionals of |
9 | // the form: |
10 | // if any_defined(inputs): |
11 | // outputs = <original_computation> |
12 | // else: |
13 | // outputs = undefineds |
14 | TORCH_API void LowerGradOf(Graph& g); |
15 | |
16 | } // namespace jit |
17 | } // namespace torch |
18 |