ncnn icon indicating copy to clipboard operation
ncnn copied to clipboard

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

Open whyb opened this issue 2 years ago • 2 comments

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

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

NCNN_EXPORT void destroy_gpu_instance(int need_wait = 0);

引用出处: 圖片

whyb avatar May 30 '23 02:05 whyb

CLA assistant check
All committers have signed the CLA.

tencent-adm avatar May 30 '23 02:05 tencent-adm

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

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     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov-commenter avatar May 30 '23 03:05 codecov-commenter

@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();

whyb avatar Apr 07 '24 09:04 whyb

Thanks for your contribution !

nihui avatar Apr 07 '24 15:04 nihui