@@ -535,9 +535,18 @@ UR_APIEXPORT ur_result_t UR_APICALL urEnqueueCooperativeKernelLaunchExp(
535
535
const size_t *pGlobalWorkOffset, const size_t *pGlobalWorkSize,
536
536
const size_t *pLocalWorkSize, uint32_t numEventsInWaitList,
537
537
const ur_event_handle_t *phEventWaitList, ur_event_handle_t *phEvent) {
538
- return urEnqueueKernelLaunch (hQueue, hKernel, workDim, pGlobalWorkOffset,
539
- pGlobalWorkSize, pLocalWorkSize,
540
- numEventsInWaitList, phEventWaitList, phEvent);
538
+ if (pGlobalWorkOffset == nullptr ) {
539
+ ur_exp_launch_property_t coop_prop;
540
+ coop_prop.id = UR_EXP_LAUNCH_PROPERTY_ID_COOPERATIVE;
541
+ coop_prop.value .cooperative = 1 ;
542
+ return urEnqueueKernelLaunchCustomExp (
543
+ hQueue, hKernel, workDim, pGlobalWorkSize, pLocalWorkSize, 1 ,
544
+ &coop_prop, numEventsInWaitList, phEventWaitList, phEvent);
545
+ } else {
546
+ return urEnqueueKernelLaunch (hQueue, hKernel, workDim, pGlobalWorkOffset,
547
+ pGlobalWorkSize, pLocalWorkSize,
548
+ numEventsInWaitList, phEventWaitList, phEvent);
549
+ }
541
550
}
542
551
543
552
UR_APIEXPORT ur_result_t UR_APICALL urEnqueueKernelLaunchCustomExp (
0 commit comments