Restore CN-GPU
This commit is contained in:
parent
0ada4ca4ac
commit
32b49797d9
41 changed files with 8648 additions and 5926 deletions
|
@ -60,6 +60,10 @@ size_t inline generate<Algorithm::CN>(Threads<CpuThreads> &threads, uint32_t lim
|
|||
++count;
|
||||
}
|
||||
|
||||
# ifdef XMRIG_ALGO_CN_GPU
|
||||
count += generate("cn/gpu", threads, Algorithm::CN_GPU, limit);
|
||||
# endif
|
||||
|
||||
return count;
|
||||
}
|
||||
|
||||
|
|
|
@ -144,13 +144,24 @@ bool xmrig::CpuWorker<N>::selfTest()
|
|||
verify(Algorithm::CN_XAO, test_output_xao) &&
|
||||
verify(Algorithm::CN_RTO, test_output_rto) &&
|
||||
verify(Algorithm::CN_HALF, test_output_half) &&
|
||||
# ifdef XMRIG_ALGO_CN_GPU
|
||||
verify(Algorithm::CN_GPU, test_output_gpu) &&
|
||||
# endif
|
||||
verify2(Algorithm::CN_R, test_output_r) &&
|
||||
verify(Algorithm::CN_RWZ, test_output_rwz) &&
|
||||
verify(Algorithm::CN_ZLS, test_output_zls) &&
|
||||
verify(Algorithm::CN_CCX, test_output_ccx) &&
|
||||
verify(Algorithm::CN_DOUBLE, test_output_double);
|
||||
|
||||
# ifdef XMRIG_ALGO_CN_GPU
|
||||
if (!rc || N > 1) {
|
||||
return rc;
|
||||
}
|
||||
|
||||
return verify(Algorithm::CN_GPU, test_output_gpu);
|
||||
# else
|
||||
return rc;
|
||||
# endif
|
||||
}
|
||||
|
||||
# ifdef XMRIG_ALGO_CN_LITE
|
||||
|
|
|
@ -76,6 +76,12 @@ xmrig::CpuThreads xmrig::AdvancedCpuInfo::threads(const Algorithm &algorithm, ui
|
|||
return 1;
|
||||
}
|
||||
|
||||
# ifdef XMRIG_ALGO_CN_GPU
|
||||
if (algorithm == Algorithm::CN_GPU) {
|
||||
return CpuThreads(threads());
|
||||
}
|
||||
# endif
|
||||
|
||||
size_t cache = 0;
|
||||
size_t count = 0;
|
||||
|
||||
|
|
|
@ -212,6 +212,12 @@ xmrig::CpuThreads xmrig::BasicCpuInfo::threads(const Algorithm &algorithm, uint3
|
|||
return 1;
|
||||
}
|
||||
|
||||
# ifdef XMRIG_ALGO_CN_GPU
|
||||
if (algorithm == Algorithm::CN_GPU) {
|
||||
return count;
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef XMRIG_ALGO_CN_LITE
|
||||
if (algorithm.family() == Algorithm::CN_LITE) {
|
||||
return CpuThreads(count, 1);
|
||||
|
|
|
@ -318,6 +318,12 @@ void xmrig::HwlocCpuInfo::processTopLevelCache(hwloc_obj_t cache, const Algorith
|
|||
}
|
||||
# endif
|
||||
|
||||
# ifdef XMRIG_ALGO_CN_GPU
|
||||
if (algorithm == Algorithm::CN_GPU) {
|
||||
cacheHashes = PUs;
|
||||
}
|
||||
# endif
|
||||
|
||||
# ifdef XMRIG_ALGO_RANDOMX
|
||||
if (extra == 0 && algorithm.l2() > 0) {
|
||||
cacheHashes = std::min<size_t>(std::max<size_t>(L2 / algorithm.l2(), cores.size()), cacheHashes);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue