@@ -2514,39 +2514,42 @@ static ur_result_t SetKernelParamsAndLaunch(
25142514 NDRDesc.GlobalOffset [1 ] != 0 ||
25152515 NDRDesc.GlobalOffset [2 ] != 0 ;
25162516
2517- std::vector<ur_kernel_launch_property_t > property_list;
2517+ ur_kernel_launch_ext_properties_t property_list = {
2518+ UR_STRUCTURE_TYPE_KERNEL_LAUNCH_EXT_PROPERTIES, nullptr , 0 };
2519+ void **last_pNext = &property_list.pNext ;
25182520
25192521 if (KernelUsesClusterLaunch) {
2520- ur_kernel_launch_property_value_t launch_property_value_cluster_range;
2521- launch_property_value_cluster_range.clusterDim [0 ] =
2522- NDRDesc.ClusterDimensions [0 ];
2523- launch_property_value_cluster_range.clusterDim [1 ] =
2524- NDRDesc.ClusterDimensions [1 ];
2525- launch_property_value_cluster_range.clusterDim [2 ] =
2526- NDRDesc.ClusterDimensions [2 ];
2527-
2528- property_list.push_back ({UR_KERNEL_LAUNCH_PROPERTY_ID_CLUSTER_DIMENSION,
2529- launch_property_value_cluster_range});
2522+ ur_kernel_launch_cluster_property_t launch_property_cluster_range;
2523+ launch_property_cluster_range.stype =
2524+ UR_STRUCTURE_TYPE_KERNEL_LAUNCH_CLUSTER_PROPERTY;
2525+ launch_property_cluster_range.pNext = nullptr ;
2526+ launch_property_cluster_range.clusterDim [0 ] = NDRDesc.ClusterDimensions [0 ];
2527+ launch_property_cluster_range.clusterDim [1 ] = NDRDesc.ClusterDimensions [1 ];
2528+ launch_property_cluster_range.clusterDim [2 ] = NDRDesc.ClusterDimensions [2 ];
2529+ *last_pNext = &launch_property_cluster_range;
2530+ last_pNext = &launch_property_cluster_range.pNext ;
25302531 }
25312532 if (IsCooperative) {
2532- ur_kernel_launch_property_value_t launch_property_value_cooperative;
2533- launch_property_value_cooperative.cooperative = 1 ;
2534- property_list.push_back ({UR_KERNEL_LAUNCH_PROPERTY_ID_COOPERATIVE,
2535- launch_property_value_cooperative});
2533+ property_list.flags |= UR_KERNEL_LAUNCH_FLAG_COOPERATIVE;
25362534 }
25372535 // If there is no implicit arg, let the driver handle it via a property
25382536 if (WorkGroupMemorySize && !ImplicitLocalArg.has_value ()) {
2539- property_list.push_back ({UR_KERNEL_LAUNCH_PROPERTY_ID_WORK_GROUP_MEMORY,
2540- {{WorkGroupMemorySize}}});
2537+ ur_kernel_launch_workgroup_property_t workgroup_property;
2538+ workgroup_property.stype =
2539+ UR_STRUCTURE_TYPE_KERNEL_LAUNCH_WORKGROUP_PROPERTY;
2540+ workgroup_property.pNext = nullptr ;
2541+ workgroup_property.workGroupMemSize = WorkGroupMemorySize;
2542+ *last_pNext = &workgroup_property;
2543+ last_pNext = &workgroup_property.pNext ;
25412544 }
25422545 ur_event_handle_t UREvent = nullptr ;
25432546 ur_result_t Error =
25442547 Adapter.call_nocheck <UrApiKind::urEnqueueKernelLaunchWithArgsExp>(
25452548 Queue.getHandleRef (), Kernel, NDRDesc.Dims ,
25462549 HasOffset ? &NDRDesc.GlobalOffset [0 ] : nullptr ,
25472550 &NDRDesc.GlobalSize [0 ], LocalSize, UrArgs.size (), UrArgs.data (),
2548- property_list.size (),
2549- property_list. empty () ? nullptr : property_list. data () ,
2551+ ( property_list.flags || property_list. pNext ) ? &property_list
2552+ : nullptr ,
25502553 RawEvents.size (), RawEvents.empty () ? nullptr : &RawEvents[0 ],
25512554 OutEventImpl ? &UREvent : nullptr );
25522555 if (Error == UR_RESULT_SUCCESS && OutEventImpl) {
0 commit comments