1 | #pragma once |
2 | |
3 | #include <torch/csrc/jit/ir/ir.h> |
4 | |
5 | namespace torch { |
6 | namespace jit { |
7 | |
8 | // Inline Fork and Wait calls. This is used, for example, in ONNX export, where |
9 | // we do not support the explicit parallelism structures and would rather |
10 | // just have a flat graph. This inlines the forked section in the fork() |
11 | // callsite and replaces uses of the result of wait() calls with the values |
12 | // produced from the (now-inlined) forked section. |
13 | TORCH_API void InlineForkWait(const std::shared_ptr<Graph>& graph); |
14 | |
15 | } // namespace jit |
16 | } // namespace torch |
17 | |