The max mem alloc size of my cpu device (i5-3470) is 4266006528(less than 4GB) and that of gpu (hd-2500) is 425721856(less than 512MB).
Now i am creating a simple buffer clInput = clCreateBuffer(context, CL_MEM_READ_ONLY | CL_MEM_ALLOC_HOST_PTR, sizeof(type) * elements, NULL, &err);
But I am getting invalid_buffer_size for GPU when size reaches 512MB. This would have made sense if i am allocating buffer on GPU memory. the only purpose of using alloc_host_ptr flag was to use the max_mem_alloc size of cpu which is 4GB. Am i doing something wrong or is it a bug?