Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't silently ignore errors in VkCompute::submit_and_wait #4769

Closed
wants to merge 1 commit into from

Conversation

Upliner
Copy link
Contributor

@Upliner Upliner commented May 31, 2023

We had a problem when there was "vkQueueSubmit failed" error printed in console but ncnn::Extractor::extract doesn't return any error because return value of submit_and_wait isn't checked.

@tencent-adm
Copy link
Member

tencent-adm commented May 31, 2023

CLA assistant check
All committers have signed the CLA.

@codecov-commenter
Copy link

codecov-commenter commented May 31, 2023

Codecov Report

Merging #4769 (c912de6) into master (ec0a850) will decrease coverage by 0.01%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##           master    #4769      +/-   ##
==========================================
- Coverage   94.90%   94.90%   -0.01%     
==========================================
  Files         779      779              
  Lines      224202   224204       +2     
==========================================
- Hits       212773   212772       -1     
- Misses      11429    11432       +3     
Impacted Files Coverage Δ
src/net.cpp 68.44% <63.63%> (-0.18%) ⬇️
src/gpu.cpp 82.57% <100.00%> (-0.01%) ⬇️

cmd.submit_and_wait();

return 0;
return cmd.submit_and_wait();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The callee returned a possible error, but the caller did not handle it

cmd.submit_and_wait();

return 0;
return cmd.submit_and_wait();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The callee returned a possible error, but the caller did not handle it

}

int ret;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove the blank line

@@ -2499,18 +2505,18 @@ int Extractor::extract(int blob_index, Mat& feat, int type)
#if NCNN_BENCHMARK
cmd.create_query_pool(d->net->layers().size() * 2);
#endif // NCNN_BENCHMARK

int ret;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the ret variable is already declared earlier. this line is not necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants