Skip to content

Commit

Permalink
MNN:Bugfix: Fix bug for opencl with dup output error
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaying committed Aug 27, 2024
1 parent d9f041a commit 509f231
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion express/module/StaticModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,6 @@ ErrorCode StaticModule::_resize(const std::vector<Express::VARP>& inputs) {
if (needResize) {
mSession->setNeedResize();
}
code = mSession->resize();
if (!needResize) {
// Check if output is used by other vars. If used, must realloc output to avoid the content dirty for output vars
// If resized, the output's memory will be all released in Session::resize, don't need clear here
Expand All @@ -489,6 +488,7 @@ ErrorCode StaticModule::_resize(const std::vector<Express::VARP>& inputs) {
}
}
}
code = mSession->resize();
} else {
// Resize
for (int i = 0; i < inputs.size(); ++i) {
Expand Down

0 comments on commit 509f231

Please sign in to comment.