Size of 3D Texture Memory

In my mind, the texture memory is actually “allocated” from global memory. So if my GPU has 6G device memory, I should be able to allocate around 6G 3D texture memory with cudaMalloc3DArray(). But the API fails and returns cudaErrorMemoryAllocation when I try to allocate 4.36G 3D texture memory…

I used the cudaChannelFormatDesc {8, 0, 0, 0, cudaChannelFormatKindUnsigned} and the extent of the 3D texture is {2048, 1216, 1878}. Anyone had the same problem before? any thoughts?

There are size restrictions on individual textures. I do not know what they are for 3D textures off the top of my head, but limits are stated in an appendix of the CUDA C Programming Guide.