What is the size of my CUDA texture memory?

How to interpret texture memory information obtained using deviceQuery to find out the texture memory size? Here is the output of my texture memory.

Max. texture size Size (x, y, z) 1D = (65536), 2D = (65536,65535), 3D = (2048, 2048, 2048)
The maximum size of the layered texture (dim) x layers 1D = (16384) x 2048, 2D = (16384,16384) x 2048

+6
source share
2 answers

This is a common misconception, but there is no such thing as texture memory in the CUDA GPU. There are only textures that are global memory allocations, accessible through specialized equipment that has built-in cache, filtering and addressing restrictions that lead to the size limits that you see in the documentation and device request. Thus, the restriction is either approximately free global memory (allowing you to fill and align in CUDA arrays), or the size limits that you have already specified.

+8
source

The output shows that the maximum texture sizes:

For 1D textures 65536 For 2D textures 65536 * 65535 For 3D textures 2048 * 2048 * 2048

If you need a size in bytes, multiply it by the maximum number of channels (4) and the maximum sub-pixel size (4B).

(For multilayer textures, multiply the corresponding numbers you got for the sizes by the number of maximum levels you got.)

However, this is the maximum size for a single texture, not the available memory for all textures.

+3
source

Source: https://habr.com/ru/post/924956/


All Articles