Questions about the memory created by clCreateBuffer

Hello, OpenCL developers.

  1. My first question is about the location of memory. I’m a little confused with how the location of the memory created with clCreateBuffer function is determined.

The type of memory (global, local, etc) is only specified in the kernel function, and at the moment of creating with clCreateBuffer, I don’t know where the memory is located.

Does the clCreateBuffer just create the memory object in a global memory ??

  1. My second question is about the size of global memory. I’m using GeForce 8800GTX and the query to the size of the global memory says :

CL_DEVICE_GLOBAL_MEM_SIZE: 777191424 bytes (= 758976 KB)

It is over 700MB. Could I use such a large amount of memory on my OpenCL programs ?

Thanks in advance

  1. Yes, clCreateBuffer allocates memory in the global memory space.

  2. At GeForce RTX 20 Series Graphics Cards and Laptops, the 8800 GTX is listed to have 768MB of memory, which is about what CL_DEVICE_GLOBAL_MEM_SIZE tells you.

Ok, I got it.

Thank you ibbles !!