From a411ee3565a4cb28bb66f5600e7f49ad837d1d31 Mon Sep 17 00:00:00 2001 From: SChernykh <15806605+SChernykh@users.noreply.github.com> Date: Mon, 19 Aug 2024 21:01:49 +0200 Subject: [PATCH] RandomX: tweaks for Zen5 --- src/crypto/randomx/jit_compiler_x86.cpp | 4 ++-- src/crypto/rx/RxConfig.cpp | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/crypto/randomx/jit_compiler_x86.cpp b/src/crypto/randomx/jit_compiler_x86.cpp index f66c4cbed..51c50036a 100644 --- a/src/crypto/randomx/jit_compiler_x86.cpp +++ b/src/crypto/randomx/jit_compiler_x86.cpp @@ -267,8 +267,8 @@ namespace randomx { initDatasetAVX2 = false; break; case xmrig::ICpuInfo::ARCH_ZEN5: - // TODO: test it - initDatasetAVX2 = false; + // AVX2 init is 49% faster on Zen5 + initDatasetAVX2 = true; break; } } diff --git a/src/crypto/rx/RxConfig.cpp b/src/crypto/rx/RxConfig.cpp index 4931e64d5..05a403bac 100644 --- a/src/crypto/rx/RxConfig.cpp +++ b/src/crypto/rx/RxConfig.cpp @@ -60,8 +60,6 @@ static const std::array msrPresets = { MsrItems{{ 0xC0011020, 0ULL }, { 0xC0011021, 0x40ULL, ~0x20ULL }, { 0xC0011022, 0x1510000ULL }, { 0xC001102b, 0x2000cc16ULL }}, MsrItems{{ 0xC0011020, 0x0004480000000000ULL }, { 0xC0011021, 0x001c000200000040ULL, ~0x20ULL }, { 0xC0011022, 0xc000000401570000ULL }, { 0xC001102b, 0x2000cc10ULL }}, 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{{ 0x1a4, 0xf }},