File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
source/adapters/level_zero Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -721,7 +721,9 @@ ur_result_t ur_context_handle_t_::getAvailableCommandList(
721
721
// are still associated with another command list. We disable cache for
722
722
// regular command list when counter based events are enabled to avoid race
723
723
// condition.
724
- if (!Queue->CounterBasedEventsEnabled ) {
724
+ if (!Queue->CounterBasedEventsEnabled &&
725
+ Queue->Device ->useDriverInOrderLists () && Queue->isInOrderQueue () &&
726
+ !Queue->UsingImmCmdLists ) {
725
727
// Initally, we need to check if a command list has already been created
726
728
// on this device that is available for use. If so, then reuse that
727
729
// Level-Zero Command List and Fence for this PI call.
Original file line number Diff line number Diff line change @@ -1644,6 +1644,10 @@ ur_result_t ur_queue_handle_t_::executeOpenCommandList(bool IsCopy) {
1644
1644
ur_result_t ur_queue_handle_t_::resetCommandList (
1645
1645
ur_command_list_ptr_t CommandList, bool MakeAvailable,
1646
1646
std::vector<ur_event_handle_t > &EventListToCleanup, bool CheckStatus) {
1647
+ if (CounterBasedEventsEnabled && Device->useDriverInOrderLists () &&
1648
+ isInOrderQueue () && !UsingImmCmdLists) {
1649
+ return UR_RESULT_SUCCESS;
1650
+ }
1647
1651
bool UseCopyEngine = CommandList->second .isCopy (this );
1648
1652
1649
1653
// Immediate commandlists do not have an associated fence.
You can’t perform that action at this time.
0 commit comments