Incorrect Memory Size

Discussion created by whiteshadow on Nov 19, 2009
Latest reply on Sep 4, 2010 by genaganna
Why memory size detected by OpenCL always smaller than actual memory size?

Sorry if this question is already ask somewhere and answer already provide, if so please point me to the correct place.


I have a machine with 4GB RAM memory and HD5870 with 1GB memory. When I use clGetDeviceInfo to get CL_DEVICE_GLOBAL_MEM_SIZE it only return 3GB RAM in my machine and only 256MB video memory from HD5870 which is actually much smaller than the original value.

At first I though memory used by OS will deducted but end up the value getting was not.

When I try to allocate 140MB memory from HD5870, it fail and said memory not enough. In the end, I was able to use less than 110MB than 1GB memory provided by the graphic card.

I wish someone can tell me what is actually happen, that will be gratefully to help me understanding more in OpenCL.


Thank you.