SWDEV-449146 - Call hipDeviceSynchronize before removeFatBinary

Added call to hipDeviceSynchronize in __hipUnregisterFatBinary
to ensure that all HSA async signal handlers complete before removeFatBinary

Change-Id: I756fecca1c2a5eae092613d8079de266399e5685


[ROCm/clr commit: ad32e604c7]
Αυτή η υποβολή περιλαμβάνεται σε:
Ioannis Assiouras committed 2024-03-20 23:40:46 +00:00
1 γονέας 471f9e6d65
υποβολή a3b6fd539f
1 file changed
+7 -1
@@ -175,7 +175,13 @@ void __hipRegisterTexture(
}
void __hipUnregisterFatBinary(hip::FatBinaryInfo** modules) {
hipError_t err = PlatformState::instance().removeFatBinary(modules);
// By calling hipDeviceSynchronize ensure that all HSA signal handlers
// complete before removeFatBinary
hipError_t err = hipDeviceSynchronize();
if (err != hipSuccess) {
LogPrintfError("Error during hipDeviceSynchronize, error: %d", err);
}
err = PlatformState::instance().removeFatBinary(modules);
guarantee((err == hipSuccess), "Cannot Unregister Fat Binary, error:%d", err);
}