3

How are constant memory and texture memory implemented in GPU? I know that device memory is off the streaming multiprocessors and is a DRAM. Shared memory is on-chip, and probably an SRAM.

I also read somewhere that parameters are passed to the kernel via constant memory (i.e., parameters to the kernel function are copied from the CPU to the GPU constant memory). Is this correct?

1 Answer 1

5

Texture memory and constant memory are allocated in the off-chip memory used by global memory, but accessed via dedicated hardware. Both memories have their own cache space (quite small) and special features like 2D pre-fetching for 2D texture memory or broadcasting for the constant memory.

Kernel parameters are stored in constant memory in Fermi and Kepler GPUs, on older G80/90/200 GPUs they are stored in shared memory.

See the CUDA C Programming Guide for more details about the caches sizes and those special features.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.