SWDEV-489823 - Fix hipStreamEndCapture leak when capture is invalidated
Change-Id: If8f5163d70e04d34a75fd0a7ba6c0a15ea59bb8b
[ROCm/clr commit: 6f2bad3998]
This commit is contained in:
1 parent
7983801b0c
commit
af3e9cb9e2
2 files changed
+7
No files matched your search
@@ -1016,6 +1016,11 @@ hipError_t hipStreamEndCapture_common(hipStream_t stream, hip::Graph** pGraph) {
|
||||
// If capture was invalidated, due to a violation of the rules of stream capture
|
||||
if (s->GetCaptureStatus() == hipStreamCaptureStatusInvalidated) {
|
||||
*pGraph = nullptr;
|
||||
// When capture is invalidated, graph should be deleted, otherwise it leaks
|
||||
hip::Graph* graph = s->GetCaptureGraph();
|
||||
delete graph;
|
||||
s->ResetCaptureGraph();
|
||||
|
||||
return hipErrorStreamCaptureInvalidated;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user