@@ -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
@@ -1568,7 +1561,10 @@ ur_result_t enqueueImmediateAppendPath(
15681561 ur_event_handle_t *Event, ur_command_list_ptr_t CommandListHelper,
15691562 bool DoProfiling) {
15701563
1564+ ur_platform_handle_t Platform = CommandBuffer->Context ->getPlatform ();
1565+
15711566 assert (CommandListHelper->second .IsImmediate );
1567+ assert (Platform->ZeCommandListImmediateAppendExt .Supported );
15721568
15731569 _ur_ze_event_list_t UrZeEventList;
15741570 if (NumEventsInWaitList) {
@@ -1586,7 +1582,8 @@ ur_result_t enqueueImmediateAppendPath(
15861582 nullptr /* ForcedCmdQueue*/ ));
15871583 assert (ZeCopyEngineImmediateListHelper->second .IsImmediate );
15881584
1589- ZE2UR_CALL (zeCommandListImmediateAppendCommandListsExp,
1585+ ZE2UR_CALL (Platform->ZeCommandListImmediateAppendExt
1586+ .zeCommandListImmediateAppendCommandListsExp ,
15901587 (ZeCopyEngineImmediateListHelper->first , 1 ,
15911588 &CommandBuffer->ZeCopyCommandList , nullptr ,
15921589 UrZeEventList.Length , UrZeEventList.ZeEventList ));
@@ -1598,7 +1595,8 @@ ur_result_t enqueueImmediateAppendPath(
15981595 ze_event_handle_t &EventToSignal =
15991596 DoProfiling ? CommandBuffer->ComputeFinishedEvent ->ZeEvent
16001597 : (*Event)->ZeEvent ;
1601- ZE2UR_CALL (zeCommandListImmediateAppendCommandListsExp,
1598+ ZE2UR_CALL (Platform->ZeCommandListImmediateAppendExt
1599+ .zeCommandListImmediateAppendCommandListsExp ,
16021600 (CommandListHelper->first , 1 , &CommandBuffer->ZeComputeCommandList ,
16031601 EventToSignal, WaitList.Length , WaitList.ZeEventList ));
16041602
@@ -1615,7 +1613,8 @@ ur_result_t enqueueImmediateAppendPath(
16151613 (CommandListHelper->first ,
16161614 CommandBuffer->ExecutionFinishedEvent ->ZeEvent , 0 , nullptr ));
16171615
1618- ZE2UR_CALL (zeCommandListImmediateAppendCommandListsExp,
1616+ ZE2UR_CALL (Platform->ZeCommandListImmediateAppendExt
1617+ .zeCommandListImmediateAppendCommandListsExp ,
16191618 (CommandListHelper->first , 1 ,
16201619 &CommandBuffer->ZeCommandListResetEvents , nullptr , 0 , nullptr ));
16211620 }
0 commit comments