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
Этот коммит содержится в:
Ioannis Assiouras
2024-03-20 20:53:37 +00:00
родитель 67473ba345
Коммит ad32e604c7
+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);
}