Skip to content

Commit 728ee8b

Browse files
miguelmartin75facebook-github-bot
authored andcommitted
torchscript_mask_rcnn.cpp: fix compilation error
Summary: Pull Request resolved: #4240 The API changed on this line to return an rvalue instead of an lvalue (atomic<int>& -> size_t) from D33801501. I've followed that diff to what seems to be the new API. Reviewed By: ebyrne, eellison, wat3rBro Differential Revision: D36394835 fbshipit-source-id: 792d80661338d0ad62033c711e75198c226b520c
1 parent 42c44b6 commit 728ee8b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

tools/deploy/torchscript_mask_rcnn.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,8 @@ int main(int argc, const char* argv[]) {
135135
export_method == "caffe2_tracing" || export_method == "tracing" ||
136136
export_method == "scripting");
137137

138-
torch::jit::getBailoutDepth() = 1;
138+
torch::jit::FusionStrategy strat = {{torch::jit::FusionBehavior::DYNAMIC, 1}};
139+
torch::jit::setFusionStrategy(strat);
139140
torch::autograd::AutoGradMode guard(false);
140141
auto module = torch::jit::load(argv[1]);
141142

0 commit comments

Comments
 (0)