Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the size of my CUDA texture memory?

Tags:

memory

cuda

How to interpret texture memory information output by deviceQuery sample to know texture memory size? Here is output of my texture memory.

Max Texture Dimension Size (x,y,z) 1D=(65536), 2D=(65536,65535),3D=(2048,2048,2048)
Max Layered Texture Size (dim) x layers 1D=(16384) x 2048, 2D=(16384,16384) x 2048

like image 869
username_4567 Avatar asked Sep 09 '12 15:09

username_4567


People also ask

What is Cuda texture memory?

TEXTURE MEMORY. Read only memory used by programs in CUDA. Used in General Purpose Computing for Accuracy and Efficiency. Designed for DirectX and OpenGL rendering Pipelines.

How does texture memory work?

The first thing to keep in mind is that texture memory is global memory. The only difference is that textures are accessed through a dedicated read-only cache, and that the cache includes hardware filtering which can perform linear floating point interpolation as part of the read process.


2 Answers

It is a common misconception, but there is no such thing as "texture memory" in CUDA GPUs. There are only textures, which are global memory allocations accessed through dedicated hardware which has inbuilt cache, filtering and addressing limitations which lead to the size limits you see reported in the documentation and device query. So the limit is either roughly the free amount of global memory (allowing for padding and alignment in CUDA arrays) or the dimensional limits you already quoted.

like image 123
talonmies Avatar answered Oct 10 '22 09:10

talonmies


The output shows that the maximum texture dimensions are:

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

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

(For layered textures, multiply the relevant numbers you got for the dimensions by the number of maximum layers you got.)

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

like image 45
Danny Varod Avatar answered Oct 10 '22 08:10

Danny Varod