Merge pull request from SChernykh/dev

Optimized autoconfig for AMD CPUs with < 2 MB L3 cache per thread
This commit is contained in:
xmrig 2025-03-22 18:36:09 +07:00 committed by GitHub
commit 36fdfa2694
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -320,8 +320,13 @@ void xmrig::HwlocCpuInfo::processTopLevelCache(hwloc_obj_t cache, const Algorith
L2 += l2->attr->cache.size;
L2_associativity = l2->attr->cache.associativity;
if (L3_exclusive && l2->attr->cache.size >= scratchpad) {
extra += scratchpad;
if (L3_exclusive) {
if (vendor() == VENDOR_AMD) {
extra += std::min<size_t>(l2->attr->cache.size, scratchpad);
}
else if (l2->attr->cache.size >= scratchpad) {
extra += scratchpad;
}
}
}
}