@@ -56,12 +56,14 @@ bool PreferCopyEngineForFill = [] {
5656ur_exp_command_buffer_handle_t_::ur_exp_command_buffer_handle_t_ (
5757 ur_context_handle_t Context, ur_device_handle_t Device,
5858 ze_command_list_handle_t CommandList,
59+ ze_command_list_handle_t CommandListTranslated,
5960 ze_command_list_handle_t CommandListResetEvents,
6061 ze_command_list_handle_t CopyCommandList,
6162 ZeStruct<ze_command_list_desc_t > ZeDesc,
6263 ZeStruct<ze_command_list_desc_t > ZeCopyDesc,
6364 const ur_exp_command_buffer_desc_t *Desc, const bool IsInOrderCmdList)
6465 : Context(Context), Device(Device), ZeComputeCommandList(CommandList),
66+ ZeComputeCommandListTranslated(CommandListTranslated),
6567 ZeCommandListResetEvents(CommandListResetEvents),
6668 ZeCommandListDesc(ZeDesc), ZeCopyCommandList(CopyCommandList),
6769 ZeCopyCommandListDesc(ZeCopyDesc), ZeFencesMap(), ZeActiveFence(nullptr ),
@@ -605,11 +607,16 @@ urCommandBufferCreateExp(ur_context_handle_t Context, ur_device_handle_t Device,
605607 &ZeCopyCommandList));
606608 }
607609
610+ ze_command_list_handle_t ZeComputeCommandListTranslated = nullptr ;
611+ ZE2UR_CALL (zelLoaderTranslateHandle,
612+ (ZEL_HANDLE_COMMAND_LIST, ZeComputeCommandList,
613+ (void **)&ZeComputeCommandListTranslated));
614+
608615 try {
609616 *CommandBuffer = new ur_exp_command_buffer_handle_t_ (
610- Context, Device, ZeComputeCommandList, ZeCommandListResetEvents ,
611- ZeCopyCommandList, ZeCommandListDesc, ZeCopyCommandListDesc ,
612- CommandBufferDesc, IsInOrder);
617+ Context, Device, ZeComputeCommandList, ZeComputeCommandListTranslated ,
618+ ZeCommandListResetEvents, ZeCopyCommandList, ZeCommandListDesc ,
619+ ZeCopyCommandListDesc, CommandBufferDesc, IsInOrder);
613620 } catch (const std::bad_alloc &) {
614621 return UR_RESULT_ERROR_OUT_OF_HOST_MEMORY;
615622 } catch (...) {
@@ -791,8 +798,8 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferAppendKernelLaunchExp(
791798 UR_ASSERT (Plt->ZeMutableCmdListExt .Supported ,
792799 UR_RESULT_ERROR_UNSUPPORTED_FEATURE);
793800 ZE2UR_CALL (Plt->ZeMutableCmdListExt .zexCommandListGetNextCommandIdExp ,
794- (CommandBuffer->ZeComputeCommandList , &ZeMutableCommandDesc ,
795- &CommandId));
801+ (CommandBuffer->ZeComputeCommandListTranslated ,
802+ &ZeMutableCommandDesc, & CommandId));
796803 DEBUG_LOG (CommandId);
797804 }
798805 try {
@@ -1619,8 +1626,9 @@ UR_APIEXPORT ur_result_t UR_APICALL urCommandBufferUpdateKernelLaunchExp(
16191626 auto Plt = CommandBuffer->Context ->getPlatform ();
16201627 UR_ASSERT (Plt->ZeMutableCmdListExt .Supported ,
16211628 UR_RESULT_ERROR_UNSUPPORTED_FEATURE);
1622- ZE2UR_CALL (Plt->ZeMutableCmdListExt .zexCommandListUpdateMutableCommandsExp ,
1623- (CommandBuffer->ZeComputeCommandList , &MutableCommandDesc));
1629+ ZE2UR_CALL (
1630+ Plt->ZeMutableCmdListExt .zexCommandListUpdateMutableCommandsExp ,
1631+ (CommandBuffer->ZeComputeCommandListTranslated , &MutableCommandDesc));
16241632 ZE2UR_CALL (zeCommandListClose, (CommandBuffer->ZeComputeCommandList ));
16251633
16261634 return UR_RESULT_SUCCESS;
0 commit comments