@@ -174,9 +174,10 @@ ur_result_t ur_command_list_manager::appendKernelLaunchUnlocked(
174174 auto zeSignalEvent = getSignalEvent (phEvent, UR_COMMAND_KERNEL_LAUNCH);
175175 auto waitListView = getWaitListView (phEventWaitList, numEventsInWaitList);
176176
177+ std::vector<void *> emptyKMemObj;
177178 UR_CALL (hKernel->prepareForSubmission (
178179 hContext.get (), hDevice.get (), pGlobalWorkOffset, workDim, WG[0 ], WG[1 ],
179- WG[2 ], getZeCommandList (), waitListView));
180+ WG[2 ], getZeCommandList (), waitListView, emptyKMemObj ));
180181
181182 if (cooperative) {
182183 TRACK_SCOPE_LATENCY (" ur_command_list_manager::"
@@ -1122,7 +1123,6 @@ ur_result_t ur_command_list_manager::appendKernelLaunchWithArgsExpNew(
11221123 break ;
11231124 case UR_EXP_KERNEL_ARG_TYPE_MEM_OBJ:
11241125 // prepareForSubmission() will save zePtr in kernelMemObj[argIndex]
1125- hKernel->kernelMemObj [argIndex] = 0 ;
11261126 hKernel->kernelArgs [argIndex] = &hKernel->kernelMemObj [argIndex];
11271127 UR_CALL (hKernel->addPendingMemoryAllocation (
11281128 {pArgs[argIndex].value .memObjTuple .hMem ,
@@ -1139,10 +1139,12 @@ ur_result_t ur_command_list_manager::appendKernelLaunchWithArgsExpNew(
11391139
11401140 // It is needed in case of UR_KERNEL_LAUNCH_PROPERTY_ID_COOPERATIVE
11411141 // to launch the cooperative kernel.
1142- ze_command_list_append_launch_kernel_param_cooperative_desc_t
1143- cooperativeDesc = {
1144- ZE_STRUCTURE_TYPE_COMMAND_LIST_APPEND_PARAM_COOPERATIVE_DESC, nullptr ,
1145- static_cast <ze_bool_t >(true )};
1142+ ZeStruct<ze_command_list_append_launch_kernel_param_cooperative_desc_t >
1143+ cooperativeDesc;
1144+ cooperativeDesc.isCooperative = static_cast <ze_bool_t >(true );
1145+ UR_ASSERT (cooperativeDesc.stype ==
1146+ ZE_STRUCTURE_TYPE_COMMAND_LIST_APPEND_PARAM_COOPERATIVE_DESC,
1147+ UR_RESULT_ERROR_INVALID_VALUE);
11461148
11471149 void *pNext = nullptr ;
11481150 if (cooperativeKernelLaunchRequested) {
@@ -1168,7 +1170,7 @@ ur_result_t ur_command_list_manager::appendKernelLaunchWithArgsExpNew(
11681170
11691171 UR_CALL (hKernel->prepareForSubmission (
11701172 hContext.get (), hDevice.get (), pGlobalWorkOffset, workDim, WG[0 ], WG[1 ],
1171- WG[2 ], getZeCommandList (), waitListView, & hKernel->kernelArgs ));
1173+ WG[2 ], getZeCommandList (), waitListView, hKernel->kernelMemObj ));
11721174
11731175 {
11741176 TRACK_SCOPE_LATENCY (" ur_command_list_manager::"
0 commit comments