6 Replies Latest reply on Jun 5, 2011 10:04 PM by richeek.arya

    Question Regarding CL_DEVICE_MAX_MEM_ALLOC_SIZE

    richeek.arya
      Conceptual question regarding memory management

      Hi,

      I am using ATI Radeon 5450 which has 1GB of video memory. When I call clGetDeviceInfo with CL_DEVICE_GLOBAL_MEM_SIZE I get around 512MB consequnetly CL_DEVICE_MAX_MEM_ALLOC_SIZE comes around 128MB. I have three questions here:

      1. Is global memory not same as Video RAM? Or else why am I not getting 1GB as the output of CL_DEVICE_GLOBAL_MEM_SIZE?

      2. When I try to create an array of size 138MB I get an error of CL_INVALID_BUFFER_SIZE which I think in this case means that buffer is too large to be allocated. Is it because CL_DEVICE_MAX_ALLOC_SIZE is 128MB? But according to the spec it is the MINIMUM value of memory allocation. What is the ceil value for it?

      3. If I create buffer with CL_MEM_ALLOC_HOST_PTR which uses pinned host memory then also I am unsuccesful in creating the buffer. In this case since the buffer is created on the Host itself why does it not succeed? Is there a way to know maximum amount of host pinned memory too?

      Thanks for patiently reading through the message!

      Regards,

      Richeek