Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Constant Memory vs Texture Memory vs Global Memory in CUDA

I am trying to find the differences between constant memory vs texture memory vs global memory in CUDA.

I am able to find the following relevant articles, but not able to find the answer to my question

global vs shared memory in CUDA

Usage of global vs. constant memory in CUDA

An article which deals with the performance implications of all the three : http://forum.beyond3d.com/showthread.php?t=52510

like image 869
c_prog_90 Avatar asked Nov 29 '11 06:11

c_prog_90


1 Answers

Constant Memory:

This is where constants and kernel arguments are stored

Slow, but with cache (8 kb)

Constant memory is optimized for broadcast

Texture Memory:

Cache optimized for 2D spatial access pattern

Reads have some advantages like address modes and interpolation that can be used at no extra cost

Global Memory:

Slow & uncached(1.0),cached(2.0)

Requires sequential & aligned 16 byte reads and writes to be fast (coalesced read/write)

Source: http://www.cvg.ethz.ch/teaching/2011spring/gpgpu/cuda_memory.pdf

like image 142
c_prog_90 Avatar answered Oct 01 '22 11:10

c_prog_90