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

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 25 07:19:56 PDT 2025


jhuber6 wrote:

> @jhuber6 The max work group size is dependant on the amount of dynamic memory the kernel will launch with, so we need to have that passed in as well.

Does it? OpenCL has https://registry.khronos.org/OpenCL/sdk/3.0/docs/man/html/clGetDeviceInfo.html which supports `CL_DEVICE_MAX_WORK_GROUP_SIZE`. The descriptions states 

>  Maximum number of work-items in a work-group that a device is capable of executing on a single compute unit, for any given kernel-instance running on the device. (Refer also to clEnqueueNDRangeKernel and CL_KERNEL_WORK_GROUP_SIZE ). The minimum value is 1. The returned value is an upper limit and will not necessarily maximize performance. This maximum may be larger than supported by a specific kernel (refer to the CL_KERNEL_WORK_GROUP_SIZE query of clGetKernelWorkGroupInfo).

So, why can't we do the same?

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


More information about the llvm-commits mailing list