Hi,
How can I allocate a single large buffer of 8GB ?
My Core i7 reports
CL_DEVICE_GLOBAL_MEM_SIZE: 16780570624
but
CL_DEVICE_MAX_MEM_ALLOC_SIZE: 4195142656
How can I increase the MAX ALLOC SIZE limit in Intel OpenCL SDK?
Thanks
Sorry it took a while for responding. Not sure if you are still looking for an answer. In theory you cannot allocate a buffer whose size is more than CL_DEVICE_MAX_MEM_ALLOC_SIZE (OpenCL doesn't allow that). But if you need a buffer that's larger than CL_DEVICE_MAX_MEM_ALLOC_SIZE, you might have to allocate multiple buffers and implement logic in your code to merge the result from these multiple buffers. What exactly are you trying to do?
Thanks,
Raghu
I know this is an old thread, however I have the same issue - I cannot allocate buffers that are > 1/4th of my available memory due to someone implementing an artificial limit.
The OpenCL specification does not seem to imply this limit. Please read https://www.khronos.org/registry/cl/specs/opencl-1.2.pdf on page 39 table 4.3 it states:
CL_DEVICE_MAX_MEM_ALLOC_SIZE
cl_ulong
Max size of memory object allocation in bytes. The minimum value is max (1/4th of CL_DEVICE_GLOBAL_MEM_SIZE , 128*1024*1024) for devices that are not of type CL_DEVICE_TYPE_CUSTOM.
Can someone please tell me why Intel OpenCL drivers (v4.4 of July 2014) impose the minimum value and not just let the CL_DEVICE_MAX_MEM_ALLOC_SIZE be set to be as big as the memory available?
Thanks,
Josh
I know this thread is old and was unearthed before but this is exactly the question I would like to ask and I did not want to open another thread. Maybe somebody got the answer somewhere in the meantime.
Why is the limit set to 1/4th?
Thank you
Do you need to know just for CPU, or do you need more info about the GPU max alloc size too?
Especially CPU but if you can tell me about the GPU limitation as well I would appreciate that. :)
I'm not an expert on the OpenCL specification, however this is what OpenCL 1.2 spec sheet says: "The minimum value is max (1/4th of CL_DEVICE_GLOBAL_MEM_SIZE , 128*1024*1024) "
so, the specification specifies a minimum value. This does not mean the minimum value should be implemented as the maximum value!
For more complete information about compiler optimizations, see our Optimization Notice.