Release graph if hipStreamEndCapture fails (#738)

This commit is contained in:
vstojilj
2025-09-08 16:32:03 +02:00
committed by GitHub
parent c9b1ad72a5
commit f17e332fe0
3 changed files with 13 additions and 5 deletions
+8
View File
@@ -20,6 +20,7 @@
#include <hip/hip_runtime.h>
#include "hip_internal.hpp"
#include "hip_graph_internal.hpp"
#include "hip_event.hpp"
#include "thread/monitor.hpp"
#include "hip_prof_api.h"
@@ -104,6 +105,13 @@ bool isValid(hipStream_t& stream) {
return false;
}
void Stream::ReleaseCaptureGraph() {
if (pCaptureGraph_ != nullptr) {
delete pCaptureGraph_;
pCaptureGraph_ = nullptr;
}
}
// ================================================================================================
int Stream::DeviceId() const { return device_->deviceId(); }