Hi.
Does any body pay attention at the maximum size data can be used in Global memory.
My GPU is geforce 8800GT, OS: XP32 sv2, MS C++ 2005.
My Global memory is 512 MB, But the maximum data I can store in Global memory is 202MB.
so 512 - 202 = 300MB can not use. does any body knows why???
I checked CUDA Profile, and *.cutil to confirm that i didn’t use Local memory.
So I think that 300MB is reserve for CUDA array. Is it right???
Thank. :)
How many CUDA contexts or host threads do you create?
CUDA contexts allocate a lot of memory.
test code.
[codebox]#include <stdio.h>
#include <cuda.h>
int main(int argc, char* argv)
{
cuInit( 0 );
CUdevice dev;
cuDeviceGet( &dev, 0 );
CUcontext context[5];
for (int i = 0; i < 5; ++i) {
cuCtxCreate( &context[i], CU_CTX_SCHED_AUTO, dev );
unsigned int free=0, total=0;
cuMemGetInfo( &free, &total);
printf( "free=%u total=%u\n", free, total );
}
printf( "\n" );
for (int i = 4; i >=0; --i) {
cuCtxDestroy( context[i] );
unsigned int free=0, total=0;
cuMemGetInfo( &free, &total);
printf( "free=%u total=%u\n", free, total );
}
return 0;
}
[/codebox]