c_prog_90
c_prog_90

Reputation: 949

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

Upvotes: 14

Views: 9249

Answers (1)

c_prog_90
c_prog_90

Reputation: 949

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

Upvotes: 14

Related Questions