Tweaked autoconfig for AMD CPUs with < 2 MB L3 cache per thread

This commit is contained in:
SChernykh 2025-06-11 18:34:50 +02:00
parent d24e13e605
commit e4c30eb0dd

View file

@ -322,7 +322,8 @@ void xmrig::HwlocCpuInfo::processTopLevelCache(hwloc_obj_t cache, const Algorith
if (L3_exclusive) {
if (vendor() == VENDOR_AMD) {
extra += std::min<size_t>(l2->attr->cache.size, scratchpad);
// For some reason, AMD CPUs can use only half of the exclusive L2/L3 cache combo efficiently
extra += std::min<size_t>(l2->attr->cache.size / 2, scratchpad);
}
else if (l2->attr->cache.size >= scratchpad) {
extra += scratchpad;