Repository navigation
[Custom Device] Fix a bug in CUDA Graph invocation related to the cus… - #77226
Conversation
|
你的PR提交成功,感谢你对开源项目的贡献! |
ae6f2e2 to
7ac49d5
Compare
Codecov Report❌ Patch coverage is
❌ Your patch status has failed because the patch coverage (66.66%) is below the target coverage (90.00%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## develop #77226 +/- ##
==========================================
Coverage ? 66.66%
==========================================
Files ? 1
Lines ? 9
Branches ? 0
==========================================
Hits ? 6
Misses ? 3
Partials ? 0 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
4edd9d6 to
bacb9e1
Compare
|
/re-run all-failed |
5224b04 to
03a7b47
Compare
|
/re-run all-failed |
…tom device lifecycle
03a7b47 to
082a7b8
Compare
|
/re-run all-failed |
| paddle::optional<std::thread::id> CUDAGraph::capturing_thread_id_{paddle::none}; | ||
| std::vector<std::function<void()>> CUDAGraph::cudagraph_pre_capture_callbacks_; | ||
|
|
||
| std::vector<CUDAGraph *> g_cuda_graph; |
There was a problem hiding this comment.
为什么需要单独增加全局参数,公用之前GPU上的参数不可以吗
There was a problem hiding this comment.
GPU在处理CudaGraph的析构函数的时候处理对应CUDAGraph::Reset()函数,不用考虑DeviceManager的生命周期。在多设备的时候抽象接口都是由DeviceManager来管理,所以依赖其生命周期。如果没有主动的调用reset()函数,在Python文件执行结束会调用一次析构函数,造成Reset函数中DeviceManager中的抽象接口超过生命周期,造成segement fault。所以通过 g_cuda_graph在维护cudagraph的Reset的资源管理。在DeviceManager释放资源之前提前把cudagraph的资源释放掉。
|
/re-run all-failed |
|
/re-run all-failed |
PR Category
Custom Device
PR Types
Bug fixes
Description
Fix a bug in CUDA Graph invocation related to the custom device lifecycle
Pcard-90546