Release graph if hipStreamEndCapture fails (#738)
This commit is contained in:
@@ -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(); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user