cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

afo
Adept I

Relationship between context an device

If an opencl context has more than one device, how much memory could I allocate?

Hi all,

I know that this could be discovered by experimentation, but I kindly ask if someone could tell me:

If a context is created with more than one device; a clCreateBuffer call can alloc more than CL_DEVICE_MAX_MEM_ALLOC_SIZE and/or the total memory allocated by clCreateBuffer calls in the same context can be greather than CL_DEVICE_MAX_MEM_ALLOC_SIZE?

I know that if I create different contexts, each with a different device, the max memory allocated is num_context x CL_DEVICE_MAX_MEM_ALLOC_SIZE; but I would like to know what happens when the different devices are in the same context.

Thanks in advance for your help.

best regards,

Alfonso

 

0 Likes
2 Replies
nou
Exemplar

you can allocate buffer up to min of CL_DEVICE_MAX_MEM_ALLOC_SIZE from all devices. this is from specification.

total memory buffer should be IMHO (as i understand specification) unlimited. but on current implementation you can allocate just up to CL_DEVICE_GLOBAL_MEM_SIZE in total. in case of multiple devices it is minimum from all devices.

0 Likes

Thanks a lot for the answer!

best regards,

Alfonso

0 Likes