Caffe2 - C++ API
A deep learning, cross platform ML framework
create_autodiff_subgraphs.h
1 #pragma once
2 
3 #include <torch/csrc/WindowsTorchApiMacro.h>
4 #include <torch/csrc/jit/ir.h>
5 
6 #include <cstddef>
7 
8 namespace torch {
9 namespace jit {
10 
11 // insert GraphExecutor nodes that group together
12 // subgraphs that are differentiable by the jit's autodiff passes
13 // threshold - minimum number of nodes that will appear in a block
14 // returns all differentiable blocks that have been found
15 TORCH_API std::vector<Node*> CreateAutodiffSubgraphs(
16  const std::shared_ptr<Graph>& graph,
17  size_t threshold = 2);
18 } // namespace jit
19 } // namespace torch
Definition: jit_type.h:17