ARM-software/ComputeLibrary

why L1_cache_size and L2_cache_size are constant value

dervon opened this issue · 1 comments

Different cpu should have different L1_cache_size/L2_cache_size, and I can't find any code in ComputeLibrary that will update these values later.

unsigned int L1_cache_size = 32768;
unsigned int L2_cache_size = 262144;

Thank you in advance.

Hi @dervon

That's correct, we don't update these values at runtime. The cache size is used to calculate the block sizes and this only works correctly if the cache sizes are reported accurately. The calculated block sizes are not guaranteed to be correct and they will change for different devices based on other variables and not just cache size.

An additional complication is that these cache sizes are not easily discoverable in Linux (and can vary across CPUs in a big/little system).

Hope this helps