Hello, I'm working under Ubuntu 9.04 with an ATI 5770 with 1GB of RAM and the latest atistream 2.0 (downloaded today).
Everything seems to work fine for now, although the instruction:
errorCode = clGetDeviceInfo(devices[0],CL_DEVICE_GLOBAL_MEM_SIZE,sizeof(cl_ulong),sizeMemGlob,NULL);
returns an amount of memory equal to "268435456 bytes", which is clearly not correct (it is exactly 1/4th of the real memory). The same amount of memory is returned when we use the constant CL_DEVICE_MAX_MEM_ALLOC_SIZE, which is correct as it must report 1/4th of the total amount (as stated by OpenCL specs).
So my question is: is it a bug or the result given when we use the constant CL_DEVICE_GLOBAL_MEM_SIZE is intended to be 1/4th of the total memory? It doesn't sound correct to me...
PS: Also beta4 seems to be affected by this bug.
You have a misconception of what the API call is returning. It is not supposed to return the total amount of memory, just amount that opencl contexts can use for global access. This is actually much more useful.
The minimum value for this is 1/4 total memory, I believe. Remember implementing OpenCL, your kernels, etc have to be stored somewhere.
Originally posted by: jcpalmer You have a misconception of what the API call is returning. It is not supposed to return the total amount of memory, just amount that opencl contexts can use for global access. This is actually much more useful.
The minimum value for this is 1/4 total memory, I believe. Remember implementing OpenCL, your kernels, etc have to be stored somewhere.
OpenCL specs says:
so, I think I've read and interpreted correctly the specs
Conclusion: clGetDeviceInfo should return 2 different values with those two constants, this is the point...
I can only say, that for me, on my EAH4850 it works as is should.
Your right, my mess up (missed reading a line). At least they "picked" the value to be wrong that is of little consequence. The one that has to be right is the alloc size. The total memory size is mostly just a stat.
Originally posted by: jcpalmer Your right, my mess up (missed reading a line). At least they "picked" the value to be wrong that is of little consequence. The one that has to be right is the alloc size. The total memory size is mostly just a stat.
@jcpalmer: I agree with you jc, it is only a little bug at the end (anyway it should be simple to fix)
@stib: So it is possibile that this bug affects only certain videocards...
I installed the new version of the SDK, and i get now false reading too. It had worked earlier.