Bug in OpenCL runtime

Discussion created by melirius on Jul 28, 2020
Latest reply on Aug 11, 2020 by dipak

OpenCL runtimes for Windows x64 at least from 15.7.1 drivers on return garbage when queried by clGetKernelWorkGroupInfo with CL_KERNEL_PRIVATE_MEM_SIZE. If there is some spilled registers, then it returns their size in global memory, and that is presumably intended usage of the function (at least Intel OpenCL works this way). But if there is no spills, then it can return 160, 144, 320 or some other number. As a result, it is useless for the kernel optimization—you never know if this number real or fake.