I see this in guide, what is the difference?
3.2.3.7. Query L2 cache Properties
Properties related to L2 cache are a part of cudaDeviceProp struct and can be queried using CUDA runtime API cudaGetDeviceProperties
CUDA Device Properties include:
l2CacheSize: The amount of available L2 cache on the GPU.
persistingL2CacheMaxSize: The maximum amount of L2 cache that can be set-aside for persisting memory accesses.
accessPolicyMaxWindowSize: The maximum size of the access policy window.
3.2.3.8. Control L2 Cache Set-Aside Size for Persisting Memory Access
The L2 set-aside cache size for persisting memory accesses is queried using CUDA runtime API cudaDeviceGetLimit and set using CUDA runtime API cudaDeviceSetLimit as a cudaLimit. The maximum value for setting this limit is cudaDeviceProp::persistingL2CacheMaxSize.
enum cudaLimit {
/* other fields not shown */
cudaLimitPersistingL2CacheSize
};
You are quoting the explanation of the three terms. What exactly is your question?
I guess these three terms are the same? They are all looking for the max persistant L2 size?
They are not the same. Your quote explains their meaning.
For A100, I see
1. l2CacheSize: 41943040
2. persistingL2CacheMaxSize: 31457280
3. accessPolicyMaxWindowSize: 134213632
- = l2 cache size
- = max amount of l2 cache that can be used for persistent access
- = max limit for
accessPolicyWindow.num_bytes
You seem to know the relevant sections in the programming guide and best practices guide. You can easily look it up. I am not going to rephrase the sections for you.
I mean, if I set a window to access persistant L2. So the persistant L2 has up limit as 30MB, but this window’s limit is not 30MB!? That is strange, right?
You can use a hit probability less than 1.0 for windows > cache size
Oh, I understand. That is why I find max window size can be 127MB, even much larger than the L2 size!