




























































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!





























































Kyu Ho Park Mar. 14, 2017
Grid 공공공공공 (Shared Memory) Register Block 0 Register Thread 0 Thread 1 공공공공공 (Shared Memory) Register Block 1 Register Thread 0 Thread 1 Global Memory Constant Memory Texture Memory Host CUDA Memory Architecture
(^) Local arrays referenced with indices whose values cannot be determined at compile time. (^) Large local structures or array that would consume too much register space. (^) Any variable that does not fit within the kernel register limit. (^) Local memory is actually a part of Global memory that has high latency and low bandwidth and are subject to the requirements for efficient memory access. (^) With compute capability 2.0 and higher, local memory data is also cached in a per-SM L1 and per-device L2cache
some part of DRAM is used for CMem ,and it is read only and Cache is supported (constant cache). The max size is 64kB. The host can write Cmem and the device can read it only. All threads can share it like the global memory. Constant variables must be declared with global scope, outside of any kernels. Constant memory is statically declared and visible to all kernels in the same compilation unit Constant memory performs best when all threads in a warp read from the same memory address constant int cData[6];
Constant memory performs best when all threads in a warp read from the same memory address. For example, a coeffcient for a mathematical formula is a good use case for constant memory because all threads in a warp will use the same coeffcient to conduct the same calculation on different data. If each thread in a warp reads from a different address, and only reads once, then constant memory is not the best choice because a single read from constant memory broadcasts to all threads in a warp.