cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

dominik_g
Journeyman III

size of global memory

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:

http://forums.amd.com/forum/messageview.cfm?FTVAR_FORUMVIEWTMP=Linear&catid=390&threadid=124142

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?

0 Likes
2 Replies
davibu
Journeyman III

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:

 

http://forums.amd.com/forum/messageview.cfm?FTVAR_FORUMVIEWTMP=Linear&catid=390&threadid=124142

 

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):

export GPU_INITIAL_HEAP_SIZE=700
export GPU_MAX_ALLOC_SIZE=700
export GPU_MAX_HEAP_SIZE=700

This will dedicate 700MB of ram to OpenCL.

 

 

0 Likes

Thanks a lot! I'll give that a try.

0 Likes