How to determine what size and how many textures I can use?

Hi,
Is there a way to determine (programmatically) what is the maximum size of 1D texture array for particular device? Is there any limitation how many texture arrays can be used in total?

There seems to be a device attribute that matches your question: DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH:

julia> attribute(device(), CUDA.DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH)
131072

256, per the compute capability table in 1. Introduction — CUDA C Programming Guide, but I don’t know of a way to query that programmatically.

1 Like