SWDEV-311271 - Move mempool clean-up into hipEventSynchronize

Generic event synchronize can be called from mempool implementation directly.

Change-Id: Id66ab9cdab486390df4dd405a4ac291eb0bb568f


[ROCm/clr commit: 140a075b6a]
This commit is contained in:
German Andryeyev
2024-01-22 18:12:33 -05:00
zatwierdzone przez Maneesh Gupta
rodzic c1eb5bccfb
commit cffd87fc79
+6 -3
Wyświetl plik
@@ -85,8 +85,6 @@ hipError_t Event::synchronize() {
event_->awaitCompletion();
}
}
// Release freed memory for all memory pools on the device
hip_device->ReleaseFreedMemory();
return hipSuccess;
}
@@ -443,7 +441,12 @@ hipError_t hipEventSynchronize(hipEvent_t event) {
if (hip::Stream::StreamCaptureOngoing(e->GetCaptureStream()) == true) {
HIP_RETURN(hipErrorStreamCaptureUnsupported);
}
HIP_RETURN(e->synchronize());
hipError_t status = e->synchronize();
// Release freed memory for all memory pools on the device
g_devices[e->deviceId()]->ReleaseFreedMemory();
HIP_RETURN(status);
}
hipError_t ihipEventQuery(hipEvent_t event) {