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