Merge pull request #3646 from SChernykh/dev
Optimized autoconfig for AMD CPUs with < 2 MB L3 cache per thread
This commit is contained in:
commit
36fdfa2694
1 changed files with 7 additions and 2 deletions
|
@ -320,11 +320,16 @@ void xmrig::HwlocCpuInfo::processTopLevelCache(hwloc_obj_t cache, const Algorith
|
||||||
L2 += l2->attr->cache.size;
|
L2 += l2->attr->cache.size;
|
||||||
L2_associativity = l2->attr->cache.associativity;
|
L2_associativity = l2->attr->cache.associativity;
|
||||||
|
|
||||||
if (L3_exclusive && l2->attr->cache.size >= 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;
|
extra += scratchpad;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// This code is supposed to run only on Intel CPUs
|
// This code is supposed to run only on Intel CPUs
|
||||||
if ((vendor() == VENDOR_INTEL) && (scratchpad == 2 * oneMiB)) {
|
if ((vendor() == VENDOR_INTEL) && (scratchpad == 2 * oneMiB)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue