Maximum data size in OpenCL

Do you know what determine the maximum size of an array (of integer, for example) that can be passed from host to device?

For example, in the dot product program what limited the maximum size of the array to 10 million?

Is the size of pageable memory matter to this limitation?

Thank you,

CL_DEVICE_ADDRESS_BITS, CL_DEVICE_MAX_MEM_ALLOC_SIZE (and CL_DEVICE_GLOBAL_MEM_SIZE) should help. On GF8800GT they return 32 bits, 128MB (and 511MB). That would mean, that on this card the biggest buffer you can get is 128 MB (and theoretically have 3 such buffers and one smaller altogether, 'cuz only 511MB of 512 is accessible). So you can have 128MB/4B = 32M = 2^25 = 33554432 32bit ints or floats in a single array.

On AMD CPU, the values are 32bit, 512MB and 1024MB now.

CL_DEVICE_ADDRESS_BITS, CL_DEVICE_MAX_MEM_ALLOC_SIZE (and CL_DEVICE_GLOBAL_MEM_SIZE) should help. On GF8800GT they return 32 bits, 128MB (and 511MB). That would mean, that on this card the biggest buffer you can get is 128 MB (and theoretically have 3 such buffers and one smaller altogether, 'cuz only 511MB of 512 is accessible). So you can have 128MB/4B = 32M = 2^25 = 33554432 32bit ints or floats in a single array.

On AMD CPU, the values are 32bit, 512MB and 1024MB now.

Thank you, PCMASTER.

In case I have 64-bit system, my array will be smaller? From your calculation, I will have maximum 16M integer array. Yes?

That is close to the number that I got from my test.

Thank you,

Thank you, PCMASTER.

In case I have 64-bit system, my array will be smaller? From your calculation, I will have maximum 16M integer array. Yes?

That is close to the number that I got from my test.

Thank you,

Actually no :-) A 64bit system can address much more memory. However, the memory of the devices is limited, no matter how many bits the OS can address :-D I have a 64 bit system myself and these are the readings. You really should be able to allocate 32M ints, if you have a similar device!

Actually no :-) A 64bit system can address much more memory. However, the memory of the devices is limited, no matter how many bits the OS can address :-D I have a 64 bit system myself and these are the readings. You really should be able to allocate 32M ints, if you have a similar device!