@@ -256,16 +256,18 @@ struct KernelWrapper<
256256 }
257257}; // KernelWrapper struct
258258
259- // This struct is inherited by sycl::handler.
259+ // This class encapsulates everything related to parsing kernel launch
260+ // properties.
260261class KernelLaunchPropertyWrapper {
261262public:
262263 // This struct is used to store kernel launch properties.
263264 // std::optional is used to indicate that the property is not set.
264265 // In some code paths, kernel launch properties are set multiple times
265266 // for the same kernel, that is why using std::optional to avoid overriding
266267 // previously set properties.
268+ // This struct is used to pass kernel launch properties across the ABI
269+ // boundary.
267270 struct KernelLaunchPropertiesT {
268-
269271 struct ScopeForwardProgressProperty {
270272 std::optional<sycl::ext::oneapi::experimental::forward_progress_guarantee>
271273 Guarantee;
@@ -282,28 +284,11 @@ class KernelLaunchPropertyWrapper {
282284 std::array<size_t , 3 > MClusterSize = {0 , 0 , 0 };
283285
284286 // Forward progress guarantee properties for work_item, sub_group and
285- // work_group scopes.
286- // Indexed by ExecutionScope enum.
287+ // work_group scopes. We need to store them for validation later.
287288 std::array<ScopeForwardProgressProperty, 3 > MForwardProgressProperties;
288-
289- KernelLaunchPropertiesT () = default ;
290-
291- // TODO: Do you even need this?
292- KernelLaunchPropertiesT (
293- ur_kernel_cache_config_t _CacheConfig, bool _IsCooperative,
294- uint32_t _WorkGroupMemorySize, bool _UsesClusterLaunch,
295- size_t _ClusterDims, std::array<size_t , 3 > _ClusterSize,
296- std::array<ScopeForwardProgressProperty, 3 > _ForwardProgressProperties)
297- : MCacheConfig(_CacheConfig), MIsCooperative(_IsCooperative),
298- MWorkGroupMemorySize (_WorkGroupMemorySize),
299- MUsesClusterLaunch(_UsesClusterLaunch), MClusterDims(_ClusterDims),
300- MClusterSize(_ClusterSize),
301- MForwardProgressProperties(_ForwardProgressProperties) {}
302- }; // struct KernelLaunchPropertiesT
289+ };
303290
304291 // / Process runtime kernel properties.
305- // /
306- // / Stores information about kernel properties into the handler.
307292 template <typename PropertiesT>
308293 static KernelLaunchPropertiesT
309294 processKernelLaunchProperties (PropertiesT Props) {
@@ -423,9 +408,6 @@ class KernelLaunchPropertyWrapper {
423408 }
424409
425410 // / Process kernel properties.
426- // /
427- // / Stores information about kernel properties into the handler.
428- // /
429411 // / Note: it is important that this function *does not* depend on kernel
430412 // / name or kernel type, because then it will be instantiated for every
431413 // / kernel, even though body of those instantiated functions could be almost
0 commit comments