Merge pull request #3665 from SChernykh/dev

Tweaked autoconfig for AMD CPUs with < 2 MB L3 cache per thread
This commit is contained in:
xmrig 2025-06-11 23:40:46 +07:00 committed by GitHub
commit 2ab7f85ccd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -322,7 +322,8 @@ void xmrig::HwlocCpuInfo::processTopLevelCache(hwloc_obj_t cache, const Algorith
if (L3_exclusive) { if (L3_exclusive) {
if (vendor() == VENDOR_AMD) { 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) { else if (l2->attr->cache.size >= scratchpad) {
extra += scratchpad; extra += scratchpad;