Merge pull request #2606 from SChernykh/dev

Fix: AstroBWT auto-config ignored max-threads-hint
This commit is contained in:
xmrig 2021-09-26 18:51:47 +07:00 committed by GitHub
commit dc02e1feaa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -216,12 +216,6 @@ bool xmrig::HwlocCpuInfo::membind(hwloc_const_bitmap_t nodeset)
xmrig::CpuThreads xmrig::HwlocCpuInfo::threads(const Algorithm &algorithm, uint32_t limit) const
{
# ifdef XMRIG_ALGO_ASTROBWT
if (algorithm == Algorithm::ASTROBWT_DERO) {
return allThreads(algorithm, limit);
}
# endif
# ifndef XMRIG_ARM
if (L2() == 0 && L3() == 0) {
return BasicCpuInfo::threads(algorithm, limit);
@ -307,9 +301,16 @@ void xmrig::HwlocCpuInfo::processTopLevelCache(hwloc_obj_t cache, const Algorith
size_t L2 = 0;
int L2_associativity = 0;
size_t extra = 0;
const size_t scratchpad = algorithm.l3();
size_t scratchpad = algorithm.l3();
uint32_t intensity = algorithm.maxIntensity() == 1 ? 0 : 1;
# ifdef XMRIG_ALGO_ASTROBWT
if (algorithm == Algorithm::ASTROBWT_DERO) {
// Use fake low value to force usage of all available cores for AstroBWT (taking 'limit' into account)
scratchpad = 16 * 1024;
}
# endif
if (cache->attr->cache.depth == 3) {
for (size_t i = 0; i < cache->arity; ++i) {
hwloc_obj_t l2 = cache->children[i];