8400M GS: Device memory? How to know exact amount of memory available on device?

I’m using Windows XP SP3, driver version is 185.85. It is interesting to note, but:

  1. cudaGetDeviceProperties returns 133890048 bytes of global memory available on the device (and this is not 128 MB)
  2. According to nvidia page my card has maximum of 256 MB
  3. NVIDIA Control Panel reports 512 MB of “Memory”

So there is the question: how do I know real amount of memory that can be allocated on the device at the moment? Which of mentioned above should be trusted more?

E.g., I’m trying to allocate 100 MB on the device (straight), but I get cudaErrorMemoryAllocation, even though I have (supposedly) 133890048 bytes. Sure, OS takes some memory, but how do I know how much is free then?

p.s. and why 512? External Image

You should run “Device Query” program to get more information about your card (SDK->Device Query).

Device Query doesn’t do any magic, it uses cudaGetDeviceProperties too.

There is cuMemGetInfo() that returns “the free and total amount of memory available for allocation by the CUDA context, in bytes.”. It is a driver API call, so probably I’m doing something wrong calling it but for me this function always returns 128MB in its free field. :unsure: