@@ -26,14 +26,9 @@ namespace {
26
26
// given Context and Device.
27
27
bool checkImmediateAppendSupport (ur_context_handle_t Context,
28
28
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.
31
29
32
- // Minimum version that supports zeCommandListImmediateAppendCommandListsExp.
33
- constexpr uint32_t MinDriverVersion = 30898 ;
34
30
bool DriverSupportsImmediateAppend =
35
- Context->getPlatform ()->isDriverVersionNewerOrSimilar (1 , 3 ,
36
- MinDriverVersion);
31
+ Context->getPlatform ()->ZeCommandListImmediateAppendExt .Supported ;
37
32
38
33
// If this environment variable is:
39
34
// - 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,
58
53
if (EnableAppendPath && !DriverSupportsImmediateAppend) {
59
54
logger::error (" {} is set but "
60
55
" 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);
65
58
std::abort ();
66
59
}
67
60
@@ -1569,7 +1562,10 @@ ur_result_t enqueueImmediateAppendPath(
1569
1562
ur_event_handle_t *Event, ur_command_list_ptr_t CommandListHelper,
1570
1563
bool DoProfiling) {
1571
1564
1565
+ ur_platform_handle_t Platform = CommandBuffer->Context ->getPlatform ();
1566
+
1572
1567
assert (CommandListHelper->second .IsImmediate );
1568
+ assert (Platform->ZeCommandListImmediateAppendExt .Supported );
1573
1569
1574
1570
_ur_ze_event_list_t UrZeEventList;
1575
1571
if (NumEventsInWaitList) {
@@ -1587,7 +1583,8 @@ ur_result_t enqueueImmediateAppendPath(
1587
1583
nullptr /* ForcedCmdQueue*/ ));
1588
1584
assert (ZeCopyEngineImmediateListHelper->second .IsImmediate );
1589
1585
1590
- ZE2UR_CALL (zeCommandListImmediateAppendCommandListsExp,
1586
+ ZE2UR_CALL (Platform->ZeCommandListImmediateAppendExt
1587
+ .zeCommandListImmediateAppendCommandListsExp ,
1591
1588
(ZeCopyEngineImmediateListHelper->first , 1 ,
1592
1589
&CommandBuffer->ZeCopyCommandList , nullptr ,
1593
1590
UrZeEventList.Length , UrZeEventList.ZeEventList ));
@@ -1599,7 +1596,8 @@ ur_result_t enqueueImmediateAppendPath(
1599
1596
ze_event_handle_t &EventToSignal =
1600
1597
DoProfiling ? CommandBuffer->ComputeFinishedEvent ->ZeEvent
1601
1598
: (*Event)->ZeEvent ;
1602
- ZE2UR_CALL (zeCommandListImmediateAppendCommandListsExp,
1599
+ ZE2UR_CALL (Platform->ZeCommandListImmediateAppendExt
1600
+ .zeCommandListImmediateAppendCommandListsExp ,
1603
1601
(CommandListHelper->first , 1 , &CommandBuffer->ZeComputeCommandList ,
1604
1602
EventToSignal, WaitList.Length , WaitList.ZeEventList ));
1605
1603
@@ -1616,7 +1614,8 @@ ur_result_t enqueueImmediateAppendPath(
1616
1614
(CommandListHelper->first ,
1617
1615
CommandBuffer->ExecutionFinishedEvent ->ZeEvent , 0 , nullptr ));
1618
1616
1619
- ZE2UR_CALL (zeCommandListImmediateAppendCommandListsExp,
1617
+ ZE2UR_CALL (Platform->ZeCommandListImmediateAppendExt
1618
+ .zeCommandListImmediateAppendCommandListsExp ,
1620
1619
(CommandListHelper->first , 1 ,
1621
1620
&CommandBuffer->ZeCommandListResetEvents , nullptr , 0 , nullptr ));
1622
1621
}
0 commit comments