Calling:
cudaExtent extent = make_cudaExtent( 1920 * sizeof(float), 1080, 10);
chanDesc = cudaCreateChannelDesc ( 32, 0, 0, 0, cudaChannelFormatKindFloat);
err = cudaMalloc3DArray ( &(devYAll[0]), &chanDesc, extent, 0);
is failing with err=cudaErrorInvalidValue. When I use the first arguement to extent as 1024 or smaller then the call to 3D array succeeds. Is there somehow a limit on the size of the memory that can be allocated with cudaMalloc3DArray ?
Yes there is a limit on extent size – either 2048x2048x2048 or 4096x4096x4096 depending on which hardware you have (from the details in your question I presume you have a Fermi card). But that true source of your problem is your
make_cudaExtentcall. ForcudaMalloc3DArray, the first argument of extent should be given in elements, not bytes. This is why you are getting an error for first dimensions > 1024, as 1024 * sizeof(float) = 4096 which is the limit of Fermi GPUs.So to allocate a 1920x1080x10 3D array, do this:
In this call, the size of the type is deduced from the channel description, and the extent dimensions are modified as required to meet the pitch/alignment requirements of the hardware.