File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
source/adapters/level_zero Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -407,11 +407,11 @@ UR_APIEXPORT ur_result_t UR_APICALL urQueueRelease(
407
407
//
408
408
// It is possible to get to here and still have an open command list
409
409
// if no wait or finish ever occurred for this queue.
410
- if (auto Res = Queue->executeAllOpenCommandLists ())
411
- return Res;
410
+ auto Res = Queue->executeAllOpenCommandLists ();
412
411
413
412
// Make sure all commands get executed.
414
- UR_CALL (Queue->synchronize ());
413
+ if (Res == UR_RESULT_SUCCESS)
414
+ UR_CALL (Queue->synchronize ());
415
415
416
416
// Destroy all the fences created associated with this queue.
417
417
for (auto it = Queue->CommandListMap .begin ();
@@ -1207,6 +1207,12 @@ ur_queue_handle_t_::executeCommandList(ur_command_list_ptr_t CommandList,
1207
1207
// Turn into a more informative end-user error.
1208
1208
return UR_RESULT_ERROR_UNKNOWN;
1209
1209
}
1210
+ // Reset Command List and erase the Fence forcing the user to resubmit
1211
+ // their commands.
1212
+ std::vector<ur_event_handle_t > EventListToCleanup;
1213
+ resetCommandList (CommandList, true , EventListToCleanup, false );
1214
+ CleanupEventListFromResetCmdList (EventListToCleanup,
1215
+ true /* QueueLocked */ );
1210
1216
return ze2urResult (ZeResult);
1211
1217
}
1212
1218
}
You can’t perform that action at this time.
0 commit comments