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

Add destroy_gpu_instance() function new parameter need_wait about it will wait for all devices to be idle before destroy #4763

Merged
merged 20 commits into from
Apr 7, 2024

Conversation

whyb
Copy link
Contributor

@whyb whyb commented May 30, 2023

书上说,须在销毁设备之前之前调用vkDeviceWaitIdle(),以等待所有设备可能存在的未完成的任何工作。

为了保持向前兼容性,所以默认参数设计成默认不启用。

NCNN_EXPORT void destroy_gpu_instance(int need_wait = 0);

引用出处:
圖片

@tencent-adm
Copy link
Member

tencent-adm commented May 30, 2023

CLA assistant check
All committers have signed the CLA.

@codecov-commenter
Copy link

codecov-commenter commented May 30, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.57%. Comparing base (7cc8910) to head (f21ec97).
Report is 1 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff             @@
##           master    #4763       +/-   ##
===========================================
- Coverage   95.19%   89.57%    -5.62%     
===========================================
  Files         722      262      -460     
  Lines      216951    74230   -142721     
===========================================
- Hits       206525    66494   -140031     
+ Misses      10426     7736     -2690     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@whyb
Copy link
Contributor Author

whyb commented Apr 7, 2024

@nihui Updated. Delete the parameter need_wait of the destroy_gpu_instance() function.

Before:

NCNN_EXPORT void destroy_gpu_instance(int need_wait = 0);

After:

NCNN_EXPORT void destroy_gpu_instance();

@nihui nihui merged commit 3b048d1 into Tencent:master Apr 7, 2024
83 checks passed
@nihui
Copy link
Member

nihui commented Apr 7, 2024

Thanks for your contribution !

senli123 pushed a commit to senli123/ncnn that referenced this pull request May 7, 2024
…e destroy (Tencent#4763)

* destroy_gpu_instance() will internally ensure that all vulkan devices are idle before proceeding with destruction.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants