Skip to content

Commit

Permalink
Fix loading time issues for POT models (with lots of results) (openvi…
Browse files Browse the repository at this point in the history
…notoolkit#10898)

* Fix loading time issues for POT models (with lots of results)

* Same for 'optimized_strided_slice'
  • Loading branch information
nosovmik authored Mar 11, 2022
1 parent 6fdd983 commit 86322c9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -273,8 +273,9 @@ bool ngraph::pass::StridedSliceOptimization::run_on_model(const std::shared_ptr<
bool rewritten = false;
if (m_use_shapes) {
rewritten = UselessStridedSliceEraser().run_on_model(f);
rewritten = rewritten || SharedStridedSliceEraser().run_on_model(f);
rewritten = rewritten || GroupedStridedSliceOptimizer().run_on_model(f);
// Execution of other passes is also needed even if 'rewritten' is already 'true'
rewritten = SharedStridedSliceEraser().run_on_model(f) || rewritten;
rewritten = GroupedStridedSliceOptimizer().run_on_model(f) || rewritten;
}
return rewritten;
}
3 changes: 2 additions & 1 deletion src/inference/dev_api/memory_solver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ class MemorySolver {
for (auto* box_in_slot : time_slots[i_slot]) {
// intersect with already stored boxes for all covered time slots
// and move up the new one if needed
popped_up = popped_up || popupTogetherWith(box, *box_in_slot);
// Execution of 'popupTogetherWith' is important even if 'popped_up' is already 'true'
popped_up = popupTogetherWith(box, *box_in_slot) || popped_up;
}
}
} while (popped_up);
Expand Down

0 comments on commit 86322c9

Please sign in to comment.