1

Possible Duplicate:
Why is the constant memory size limited in CUDA?

I understand that __constant__ memory has a cache, but I'm not clear if all of __constant__ memory is cached.

It doesn't appear as though __constant__ data goes directly to cache. Literature: It only goes to cache if it is read by a kernel. This implies the cache size is smaller than the __constant__ mem size. My guess is that __constant__ mem is just global memory with cache support. (True?)

If my deviceProp.totalConstMem = 64KB. Does this mean I have a 64KB cache supporting it? Would this be L1 or L2 cache? Is this cache at all related to deviceProp.l2CacheSize?

Community
  • 1
  • 1
Doug
  • 2,783
  • 6
  • 33
  • 37
  • It's just like a normal CPU cache - call it L1 if you like, but since there's only one cache for constant memory then the 1 is redundant. The constant memory itself is just a chunk of DRAM but it's not mapped into the same address space as global memory. – Paul R Oct 19 '12 at 18:49
  • 2
    This thread may answer your question: http://stackoverflow.com/questions/10256402/why-is-the-constant-memory-size-limited-in-cuda – njuffa Oct 19 '12 at 19:11
  • It depends of your nvidia card and compute capability, search in the specifications of the cuda toolkit. – eLRuLL Oct 20 '12 at 01:54

0 Answers0