@@ -26,14 +26,9 @@ namespace {
2626// given Context and Device.
2727bool checkImmediateAppendSupport (ur_context_handle_t Context,
2828 ur_device_handle_t Device) {
29- // TODO The L0 driver is not reporting this extension yet. Once it does,
30- // switch to using the variable zeDriverImmediateCommandListAppendFound.
3129
32- // Minimum version that supports zeCommandListImmediateAppendCommandListsExp.
33- constexpr uint32_t MinDriverVersion = 30898 ;
3430 bool DriverSupportsImmediateAppend =
35- Context->getPlatform ()->isDriverVersionNewerOrSimilar (1 , 3 ,
36- MinDriverVersion);
31+ Context->getPlatform ()->ZeCommandListImmediateAppendExt .Supported ;
3732
3833 // If this environment variable is:
3934 // - Set to 1: the immediate append path will always be enabled as long the
@@ -58,10 +53,8 @@ bool checkImmediateAppendSupport(ur_context_handle_t Context,
5853 if (EnableAppendPath && !DriverSupportsImmediateAppend) {
5954 logger::error (" {} is set but "
6055 " the current driver does not support the "
61- " zeCommandListImmediateAppendCommandListsExp entrypoint. A "
62- " driver version of at least {} is required to use the "
63- " immediate append path." ,
64- AppendEnvVarName, MinDriverVersion);
56+ " zeCommandListImmediateAppendCommandListsExp entrypoint." ,
57+ AppendEnvVarName);
6558 std::abort ();
6659 }
6760
@@ -1569,7 +1562,10 @@ ur_result_t enqueueImmediateAppendPath(
15691562 ur_event_handle_t *Event, ur_command_list_ptr_t CommandListHelper,
15701563 bool DoProfiling) {
15711564
1565+ ur_platform_handle_t Platform = CommandBuffer->Context ->getPlatform ();
1566+
15721567 assert (CommandListHelper->second .IsImmediate );
1568+ assert (Platform->ZeCommandListImmediateAppendExt .Supported );
15731569
15741570 _ur_ze_event_list_t UrZeEventList;
15751571 if (NumEventsInWaitList) {
@@ -1587,7 +1583,8 @@ ur_result_t enqueueImmediateAppendPath(
15871583 nullptr /* ForcedCmdQueue*/ ));
15881584 assert (ZeCopyEngineImmediateListHelper->second .IsImmediate );
15891585
1590- ZE2UR_CALL (zeCommandListImmediateAppendCommandListsExp,
1586+ ZE2UR_CALL (Platform->ZeCommandListImmediateAppendExt
1587+ .zeCommandListImmediateAppendCommandListsExp ,
15911588 (ZeCopyEngineImmediateListHelper->first , 1 ,
15921589 &CommandBuffer->ZeCopyCommandList , nullptr ,
15931590 UrZeEventList.Length , UrZeEventList.ZeEventList ));
@@ -1599,7 +1596,8 @@ ur_result_t enqueueImmediateAppendPath(
15991596 ze_event_handle_t &EventToSignal =
16001597 DoProfiling ? CommandBuffer->ComputeFinishedEvent ->ZeEvent
16011598 : (*Event)->ZeEvent ;
1602- ZE2UR_CALL (zeCommandListImmediateAppendCommandListsExp,
1599+ ZE2UR_CALL (Platform->ZeCommandListImmediateAppendExt
1600+ .zeCommandListImmediateAppendCommandListsExp ,
16031601 (CommandListHelper->first , 1 , &CommandBuffer->ZeComputeCommandList ,
16041602 EventToSignal, WaitList.Length , WaitList.ZeEventList ));
16051603
@@ -1616,7 +1614,8 @@ ur_result_t enqueueImmediateAppendPath(
16161614 (CommandListHelper->first ,
16171615 CommandBuffer->ExecutionFinishedEvent ->ZeEvent , 0 , nullptr ));
16181616
1619- ZE2UR_CALL (zeCommandListImmediateAppendCommandListsExp,
1617+ ZE2UR_CALL (Platform->ZeCommandListImmediateAppendExt
1618+ .zeCommandListImmediateAppendCommandListsExp ,
16201619 (CommandListHelper->first , 1 ,
16211620 &CommandBuffer->ZeCommandListResetEvents , nullptr , 0 , nullptr ));
16221621 }
0 commit comments