[llvm] [Offload] Add olKernelMaxGroupSize (PR #142950)

Ross Brunton via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 5 05:53:18 PDT 2025


================
@@ -24,6 +24,19 @@ def : Function {
     let returns = [];
 }
 
+def : Function {
+    let name = "olKernelMaxGroupSize";
+    let desc = "Get the maximum block size needed to achieve maximum occupancy.";
+    let details = [];
+    let params = [
+        Param<"ol_kernel_handle_t", "Kernel", "handle of the kernel", PARAM_IN>,
+        Param<"ol_device_handle_t", "Device", "device intended to run the kernel", PARAM_IN>,
----------------
RossBrunton wrote:

I was originally planning on using `getKernelInfo` (similar to `olGetDeviceInfo`, `olGetPlatformInfo` etc.), but the fact that the query requires a device and memory size complicates that.

Unless you meant something similar to `stat()`, where it populates a buffer with information that the implementation might find useful? I can see the appeal of that, but it might result in plugins wasting time computing things that won't end up used.

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


More information about the llvm-commits mailing list