mirror of
https://github.com/xmrig/xmrig.git
synced 2026-06-29 14:02:39 -04:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cbce30ee11 |
@@ -8,7 +8,7 @@ else
|
|||||||
modprobe msr allow_writes=on
|
modprobe msr allow_writes=on
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if grep -E 'AMD Ryzen|AMD EPYC|AuthenticAMD' /proc/cpuinfo > /dev/null;
|
if grep -E 'AMD Ryzen|AMD EPYC' /proc/cpuinfo > /dev/null;
|
||||||
then
|
then
|
||||||
if grep "cpu family[[:space:]]\{1,\}:[[:space:]]25" /proc/cpuinfo > /dev/null;
|
if grep "cpu family[[:space:]]\{1,\}:[[:space:]]25" /proc/cpuinfo > /dev/null;
|
||||||
then
|
then
|
||||||
@@ -28,14 +28,6 @@ if grep -E 'AMD Ryzen|AMD EPYC|AuthenticAMD' /proc/cpuinfo > /dev/null;
|
|||||||
wrmsr -a 0xc001102b 0x2000cc10
|
wrmsr -a 0xc001102b 0x2000cc10
|
||||||
echo "MSR register values for Zen3 applied"
|
echo "MSR register values for Zen3 applied"
|
||||||
fi
|
fi
|
||||||
elif grep "cpu family[[:space:]]\{1,\}:[[:space:]]26" /proc/cpuinfo > /dev/null;
|
|
||||||
then
|
|
||||||
echo "Detected Zen5 CPU"
|
|
||||||
wrmsr -a 0xc0011020 0x4400000000000
|
|
||||||
wrmsr -a 0xc0011021 0x4000000000040
|
|
||||||
wrmsr -a 0xc0011022 0x8680000401570000
|
|
||||||
wrmsr -a 0xc001102b 0x2040cc10
|
|
||||||
echo "MSR register values for Zen5 applied"
|
|
||||||
else
|
else
|
||||||
echo "Detected Zen1/Zen2 CPU"
|
echo "Detected Zen1/Zen2 CPU"
|
||||||
wrmsr -a 0xc0011020 0
|
wrmsr -a 0xc0011020 0
|
||||||
|
|||||||
@@ -359,9 +359,7 @@ void xmrig::CpuWorker<N>::start()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Nonce::isPaused()) {
|
consumeJob();
|
||||||
consumeJob();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -326,8 +326,7 @@ void xmrig::HwlocCpuInfo::processTopLevelCache(hwloc_obj_t cache, const Algorith
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// This code is supposed to run only on Intel CPUs
|
if (scratchpad == 2 * oneMiB) {
|
||||||
if ((vendor() == VENDOR_INTEL) && (scratchpad == 2 * oneMiB)) {
|
|
||||||
if (L2 && (cores.size() * oneMiB) == L2 && L2_associativity == 16 && L3 >= L2) {
|
if (L2 && (cores.size() * oneMiB) == L2 && L2_associativity == 16 && L3 >= L2) {
|
||||||
L3 = L2;
|
L3 = L2;
|
||||||
extra = L2;
|
extra = L2;
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ void xmrig::CudaWorker::start()
|
|||||||
std::this_thread::yield();
|
std::this_thread::yield();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isReady() && !consumeJob()) {
|
if (!consumeJob()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -190,7 +190,7 @@ void xmrig::OclWorker::start()
|
|||||||
std::this_thread::yield();
|
std::this_thread::yield();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isReady() && !consumeJob()) {
|
if (!consumeJob()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -576,11 +576,6 @@ void xmrig::Miner::setJob(const Job &job, bool donate)
|
|||||||
|
|
||||||
# ifdef XMRIG_ALGO_RANDOMX
|
# ifdef XMRIG_ALGO_RANDOMX
|
||||||
const bool ready = d_ptr->initRX();
|
const bool ready = d_ptr->initRX();
|
||||||
|
|
||||||
// Always reset nonce on RandomX dataset change
|
|
||||||
if (!ready) {
|
|
||||||
d_ptr->reset = true;
|
|
||||||
}
|
|
||||||
# else
|
# else
|
||||||
constexpr const bool ready = true;
|
constexpr const bool ready = true;
|
||||||
# endif
|
# endif
|
||||||
|
|||||||
@@ -267,8 +267,8 @@ namespace randomx {
|
|||||||
initDatasetAVX2 = false;
|
initDatasetAVX2 = false;
|
||||||
break;
|
break;
|
||||||
case xmrig::ICpuInfo::ARCH_ZEN5:
|
case xmrig::ICpuInfo::ARCH_ZEN5:
|
||||||
// AVX2 init is 49% faster on Zen5
|
// TODO: test it
|
||||||
initDatasetAVX2 = true;
|
initDatasetAVX2 = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -60,6 +60,8 @@ static const std::array<MsrItems, kMsrArraySize> msrPresets = {
|
|||||||
MsrItems{{ 0xC0011020, 0ULL }, { 0xC0011021, 0x40ULL, ~0x20ULL }, { 0xC0011022, 0x1510000ULL }, { 0xC001102b, 0x2000cc16ULL }},
|
MsrItems{{ 0xC0011020, 0ULL }, { 0xC0011021, 0x40ULL, ~0x20ULL }, { 0xC0011022, 0x1510000ULL }, { 0xC001102b, 0x2000cc16ULL }},
|
||||||
MsrItems{{ 0xC0011020, 0x0004480000000000ULL }, { 0xC0011021, 0x001c000200000040ULL, ~0x20ULL }, { 0xC0011022, 0xc000000401570000ULL }, { 0xC001102b, 0x2000cc10ULL }},
|
MsrItems{{ 0xC0011020, 0x0004480000000000ULL }, { 0xC0011021, 0x001c000200000040ULL, ~0x20ULL }, { 0xC0011022, 0xc000000401570000ULL }, { 0xC001102b, 0x2000cc10ULL }},
|
||||||
MsrItems{{ 0xC0011020, 0x0004400000000000ULL }, { 0xC0011021, 0x0004000000000040ULL, ~0x20ULL }, { 0xC0011022, 0x8680000401570000ULL }, { 0xC001102b, 0x2040cc10ULL }},
|
MsrItems{{ 0xC0011020, 0x0004400000000000ULL }, { 0xC0011021, 0x0004000000000040ULL, ~0x20ULL }, { 0xC0011022, 0x8680000401570000ULL }, { 0xC001102b, 0x2040cc10ULL }},
|
||||||
|
|
||||||
|
// TODO: Tune it for Zen5 when it's available
|
||||||
MsrItems{{ 0xC0011020, 0x0004400000000000ULL }, { 0xC0011021, 0x0004000000000040ULL, ~0x20ULL }, { 0xC0011022, 0x8680000401570000ULL }, { 0xC001102b, 0x2040cc10ULL }},
|
MsrItems{{ 0xC0011020, 0x0004400000000000ULL }, { 0xC0011021, 0x0004000000000040ULL, ~0x20ULL }, { 0xC0011022, 0x8680000401570000ULL }, { 0xC001102b, 0x2040cc10ULL }},
|
||||||
|
|
||||||
MsrItems{{ 0x1a4, 0xf }},
|
MsrItems{{ 0x1a4, 0xf }},
|
||||||
|
|||||||
Reference in New Issue
Block a user