SWDEV-460770 - Handle Graph Exec release
Handle GraphExec instance is destroyed before async launch completes GraphExec instance is destroyed after async launch completes GraphExec instance is destroyed without a launch Change-Id: I45a7c82295fea916c7559bd8f796df710513aea1
This commit is contained in:
committed by
Maneesh Gupta
orang tua
51e4368723
melakukan
bf4d10ff61
@@ -343,10 +343,14 @@ hipError_t hipStreamSynchronize_common(hipStream_t stream) {
|
||||
constexpr bool kDontWaitForCpu = false;
|
||||
|
||||
auto hip_stream = hip::getStream(stream, wait);
|
||||
|
||||
// Wait for the current host queue
|
||||
hip_stream->finish(kDontWaitForCpu);
|
||||
|
||||
if (stream == nullptr) {
|
||||
// null stream will sync with other streams.
|
||||
ReleaseGraphExec(hip_stream->DeviceId());
|
||||
} else {
|
||||
ReleaseGraphExec(hip_stream);
|
||||
}
|
||||
// Release freed memory for all memory pools on the device
|
||||
hip_stream->GetDevice()->ReleaseFreedMemory();
|
||||
return hipSuccess;
|
||||
|
||||
Reference in New Issue
Block a user