@@ -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
@@ -1568,7 +1561,10 @@ ur_result_t enqueueImmediateAppendPath(
1568
1561
ur_event_handle_t *Event, ur_command_list_ptr_t CommandListHelper,
1569
1562
bool DoProfiling) {
1570
1563
1564
+ ur_platform_handle_t Platform = CommandBuffer->Context ->getPlatform ();
1565
+
1571
1566
assert (CommandListHelper->second .IsImmediate );
1567
+ assert (Platform->ZeCommandListImmediateAppendExt .Supported );
1572
1568
1573
1569
_ur_ze_event_list_t UrZeEventList;
1574
1570
if (NumEventsInWaitList) {
@@ -1586,7 +1582,8 @@ ur_result_t enqueueImmediateAppendPath(
1586
1582
nullptr /* ForcedCmdQueue*/ ));
1587
1583
assert (ZeCopyEngineImmediateListHelper->second .IsImmediate );
1588
1584
1589
- ZE2UR_CALL (zeCommandListImmediateAppendCommandListsExp,
1585
+ ZE2UR_CALL (Platform->ZeCommandListImmediateAppendExt
1586
+ .zeCommandListImmediateAppendCommandListsExp ,
1590
1587
(ZeCopyEngineImmediateListHelper->first , 1 ,
1591
1588
&CommandBuffer->ZeCopyCommandList , nullptr ,
1592
1589
UrZeEventList.Length , UrZeEventList.ZeEventList ));
@@ -1598,7 +1595,8 @@ ur_result_t enqueueImmediateAppendPath(
1598
1595
ze_event_handle_t &EventToSignal =
1599
1596
DoProfiling ? CommandBuffer->ComputeFinishedEvent ->ZeEvent
1600
1597
: (*Event)->ZeEvent ;
1601
- ZE2UR_CALL (zeCommandListImmediateAppendCommandListsExp,
1598
+ ZE2UR_CALL (Platform->ZeCommandListImmediateAppendExt
1599
+ .zeCommandListImmediateAppendCommandListsExp ,
1602
1600
(CommandListHelper->first , 1 , &CommandBuffer->ZeComputeCommandList ,
1603
1601
EventToSignal, WaitList.Length , WaitList.ZeEventList ));
1604
1602
@@ -1615,7 +1613,8 @@ ur_result_t enqueueImmediateAppendPath(
1615
1613
(CommandListHelper->first ,
1616
1614
CommandBuffer->ExecutionFinishedEvent ->ZeEvent , 0 , nullptr ));
1617
1615
1618
- ZE2UR_CALL (zeCommandListImmediateAppendCommandListsExp,
1616
+ ZE2UR_CALL (Platform->ZeCommandListImmediateAppendExt
1617
+ .zeCommandListImmediateAppendCommandListsExp ,
1619
1618
(CommandListHelper->first , 1 ,
1620
1619
&CommandBuffer->ZeCommandListResetEvents , nullptr , 0 , nullptr ));
1621
1620
}
0 commit comments