Skip to content

Commit

Permalink
fix mmseg output sync (open-mmlab#2122)
Browse files Browse the repository at this point in the history
  • Loading branch information
irexyc authored May 30, 2023
1 parent 012a754 commit 25cea0a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions csrc/mmdeploy/codebase/mmseg/segment.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ class ResizeMask : public MMSegmentation {
auto input_width = preprocess_result["img_metas"]["ori_shape"][2].get<int>();
Device host{"cpu"};
OUTCOME_TRY(auto host_tensor, MakeAvailableOnDevice(mask, host, stream_));
OUTCOME_TRY(stream().Wait()); // should sync even mask is on cpu
if (!with_argmax_) {
// (C, H, W) -> (H, W, C)
::mmdeploy::operation::Context ctx(host, stream_);
Expand Down

0 comments on commit 25cea0a

Please sign in to comment.