Skip to content

Commit 2cdd2d9

Browse files
fixed incorrect catch
Signed-off-by: Zhang, Winston <[email protected]>
1 parent 028bacd commit 2cdd2d9

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

unified-runtime/source/adapters/level_zero/program.cpp

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -590,22 +590,6 @@ ur_result_t urProgramRelease(
590590
return UR_RESULT_ERROR_INVALID_PROGRAM;
591591
}
592592

593-
if (!Program->AssociatedDevices.empty()) {
594-
for (const auto &Device : Program->AssociatedDevices) {
595-
if (Device && Device->ZeDevice) {
596-
ze_module_handle_t zeModuleHandle =
597-
Program->getZeModuleHandle(Device->ZeDevice);
598-
599-
// Validate that the retrieved module handle is valid
600-
// A null module handle in certain states could indicate corruption or
601-
// double-release
602-
if (!zeModuleHandle) {
603-
return UR_RESULT_ERROR_INVALID_PROGRAM;
604-
}
605-
}
606-
}
607-
}
608-
609593
} catch (...) {
610594
// If we can't safely access the program members, it's likely
611595
// corrupted/freed This catches the case where urProgramRelease is called on

0 commit comments

Comments
 (0)