File tree Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Expand file tree Collapse file tree 1 file changed +2
-1
lines changed Original file line number Diff line number Diff line change 7
7
#include " torch/csrc/jit/passes/guard_elimination.h"
8
8
#include " torch/csrc/jit/passes/peephole.h"
9
9
#include " torch/csrc/jit/runtime/graph_executor.h"
10
+ #include " torch/csrc/jit/api/function_impl.h"
10
11
11
12
#include " core/util/prelude.h"
12
13
#include " torch/csrc/jit/passes/subgraph_rewrite.h"
@@ -34,7 +35,7 @@ void replaceLinearWithBiasNonePattern(std::shared_ptr<torch::jit::Graph> graph)
34
35
continue ;
35
36
} else {
36
37
torch::jit::WithInsertPoint guard (*it);
37
- std::shared_ptr<torch::jit::Graph> d_graph = decompose_funcs.get_function (" linear" ).graph ();
38
+ std::shared_ptr<torch::jit::Graph> d_graph = toGraphFunction ( decompose_funcs.get_function (" linear" ) ).graph ();
38
39
torch::jit::Value* new_output = insertGraph (*it->owningGraph (), *d_graph, it->inputs ()).at (0 );
39
40
new_output->setType (it->output ()->type ());
40
41
it->output ()->replaceAllUsesWith (new_output);
You can’t perform that action at this time.
0 commit comments