2 Replies Latest reply on Apr 28, 2010 1:28 PM by dominik_g

    size of global memory

    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?

        • size of global memory
          davibu

           

          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.