I hope this helps you . You may have reached a memory allocation limit of your OpenCL driver/device. Check the values returned by clGetDeviceInfo. There is a limit for the size of one single memory object. The OpenCL driver may allow the total size of all allocated memory objects to exceed the memory size on your device, and will copy them to/from host memory when needed. To process large images, you may have to split them into smaller pieces, and process them separately.
OpenCL buffer allocation and mapping best practice
will be helpful for those in need If you use CL_MEM_ALLOC_HOST_PTR you have the chance that the underlying implementation of OpenCL might use page-locked memory. That means that the page cannot be swapped out to disk and that the transfer between host and device memory would be done DMA style without wasting CPU cycles. Therefore in this case CL_MEM_ALLOC_HOST_PTR would be the best solution.
Buffer memory allocation for Dynamic uniform buffer in Vulkan
seems to work fine The minimum UBO alignment is a restriction on you. That is, it tells you that the start of every UBO must be some multiple of that alignment. It tells you where you must put your data in memory, in order for the system to use that data.