[llvm] [offload] Add properties parameter to olLaunchKernel (PR #184343)

Kevin Sala Penades via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 5 09:57:06 PST 2026


================
@@ -1058,6 +1092,25 @@ Error olLaunchKernel_impl(ol_queue_handle_t Queue, ol_device_handle_t Device,
   LaunchArgs.ThreadLimit[2] = LaunchSizeArgs->GroupSize.z;
   LaunchArgs.DynCGroupMem = LaunchSizeArgs->DynSharedMemory;
 
+  while (Properties && Properties->type != OL_KERNEL_LAUNCH_PROP_TYPE_NONE) {
+    switch (Properties->type) {
+    case OL_KERNEL_LAUNCH_PROP_TYPE_SIZE:
+      LaunchArgs.ArgSizes = const_cast<int64_t *>(
+          reinterpret_cast<const int64_t *>(Properties->data));
----------------
kevinsala wrote:

I'm fine with the `size_t` in the API. However, `size_t` and `int64_t` are not guaranteed to have the same size (e.g., `size_t` can be 4 bytes 32bit machines). I think you should first read the data as a `size_t` (matching what you require in the API), and then, cast it to `int64_t` if needed.

https://github.com/llvm/llvm-project/pull/184343


More information about the llvm-commits mailing list