Max dimension of cudaArray

Is there a limit on the size of a single dimension of a cudaArray?

Yes.

From the new FAQ:

I’ve just tried with the release 1.0. It seems like I can’t choose more than 4096 texels as width. I mean, I detect no error with cudaGetLastError(). But the texture fetching I’m doing using this array gives me anything consistent (weird numbers or nan). Here is the code:

#define WIDTH 4096

...

cudaChannelFormatDesc channelDesc = cudaCreateChannelDesc(32, 32, 32, 32, cudaChannelFormatKindFloat);

cudaMallocArray(&array, &channelDesc, WIDTH, Height);

cudaBindTextureToArray(array_ref, array);

If I choose a number greater than 4096 for MAXLENGTH, it doesn’t work properly. I don’t mind I can use 4096 of course. But I’m surprised because the limit is supposed to be 64K.

(N.B.: Height is low, few units)

Actually the problem seems more tricky. The more I add texels in my textures (by increasing the model size) the more I need to decrease WIDTH… I’m using about 15 textures. Would it be possible that there is some mess somewhere with the allocation in global memory?