Originally posted by: dominik_g Hi,
I have an ATI Radeon HD5970 GPU which is supposed to have 1GB of memory. However, querying CL_DEVICE_GLOBAL_MEM_SIZE tells me that I only have 256MB of memory. I read that this is a common bug:
I thought that although the value of this query is wrong, I would still be able to allocate 1GB of main memory. However, when allocating 2 buffers of size 256MB, for example, the error code CL_MEM_OBJECT_ALLOCATION_FAILURE is returned...
Does anyone have the same problem?
You can define how much GPU memory is available for OpenCL by defining the following 3 env. variables: GPU_INITIAL_HEAP_SIZE, GPU_MAX_ALLOC_SIZE, GPU_MAX_HEAP_SIZE
For instance with something like (assuming you are working under linux):
This will dedicate 700MB of ram to OpenCL.
Thanks a lot! I'll give that a try.