Merge branch 'master' into pr-mo-flex-msvc-error
This commit is contained in:
commit
2a90c51f69
5 changed files with 46 additions and 10 deletions
|
@ -56,6 +56,7 @@ void MoBenchmark::finish() {
|
|||
LOG_INFO("%s " BRIGHT_BLACK_BG(CYAN_BOLD_S " ALGO PERFORMANCE CALIBRATION COMPLETE "), Tags::benchmark());
|
||||
m_controller->miner()->pause(); // do not compute anything before job from the pool
|
||||
JobResults::stop();
|
||||
JobResults::setListener(m_controller->network(), m_controller->config()->cpu().isHwAES());
|
||||
m_controller->start();
|
||||
}
|
||||
|
||||
|
@ -67,6 +68,7 @@ rapidjson::Value MoBenchmark::toJSON(rapidjson::Document &doc) const
|
|||
Value obj(kObjectType);
|
||||
|
||||
for (const Algorithm a : Algorithm::all()) {
|
||||
if (algo_perf[a.id()] == 0.0f) continue;
|
||||
obj.AddMember(StringRef(a.name()), algo_perf[a.id()], allocator);
|
||||
}
|
||||
|
||||
|
@ -118,10 +120,16 @@ double MoBenchmark::get_algo_perf(Algorithm::Id algo) const {
|
|||
case Algorithm::CN_RWZ: return algo_perf[Algorithm::CN_R] / 3 * 4;
|
||||
case Algorithm::CN_ZLS: return algo_perf[Algorithm::CN_R] / 3 * 4;
|
||||
case Algorithm::CN_DOUBLE: return algo_perf[Algorithm::CN_R] / 2;
|
||||
# ifdef XMRIG_ALGO_CN_LITE
|
||||
case Algorithm::CN_LITE_0: return algo_perf[Algorithm::CN_LITE_1];
|
||||
# endif
|
||||
# ifdef XMRIG_ALGO_CN_PICO
|
||||
case Algorithm::CN_PICO_TLO: return algo_perf[Algorithm::CN_PICO_0];
|
||||
# endif
|
||||
# ifdef XMRIG_ALGO_RANDOMX
|
||||
case Algorithm::RX_SFX: return algo_perf[Algorithm::RX_0];
|
||||
case Algorithm::RX_XEQ: return algo_perf[Algorithm::RX_ARQ];
|
||||
# endif
|
||||
default: return algo_perf[algo];
|
||||
}
|
||||
}
|
||||
|
@ -147,17 +155,21 @@ void MoBenchmark::start() {
|
|||
m_bench_job = Job(false, Algorithm(bench_algos[m_bench_algo]), "benchmark");
|
||||
m_bench_job.setId(algo.name()); // need to set different id so that workers will see job change
|
||||
switch (algo.id()) {
|
||||
# ifdef XMRIG_ALGO_KAWPOW
|
||||
case Algorithm::KAWPOW_RVN:
|
||||
m_bench_job.setBlob("4c38e8a5f7b2944d1e4274635d828519b97bc64a1f1c7896ecdbb139989aa0e80000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
|
||||
m_bench_job.setDiff(Job::toDiff(strtoull("000000639c000000", nullptr, 16)));
|
||||
m_bench_job.setHeight(1500000);
|
||||
break;
|
||||
# endif
|
||||
|
||||
# ifdef XMRIG_ALGO_GHOSTRIDER
|
||||
case Algorithm::GHOSTRIDER_RTM:
|
||||
case Algorithm::FLEX_KCN:
|
||||
m_bench_job.setBlob("000000208c246d0b90c3b389c4086e8b672ee040d64db5b9648527133e217fbfa48da64c0f3c0a0b0e8350800568b40fbb323ac3ccdf2965de51b9aaeb939b4f11ff81c49b74a16156ff251c00000000");
|
||||
m_bench_job.setDiff(1000);
|
||||
break;
|
||||
# endif
|
||||
|
||||
default:
|
||||
// 99 here to trigger all future bench_algo versions for auto veriant detection based on block version
|
||||
|
@ -215,11 +227,15 @@ void MoBenchmark::onJobResult(const JobResult& result) {
|
|||
if (!(hashrate = t[1]))
|
||||
if (!(hashrate = t[0]))
|
||||
hashrate = static_cast<double>(m_hash_count) * result.diff / (now - m_bench_start) * 1000.0f;
|
||||
# ifdef XMRIG_ALGO_KAWPOW
|
||||
if (algo.id() == Algorithm::KAWPOW_RVN) hashrate /= ((double)0xFFFFFFFFFFFFFFFF) / 0xFF000000;
|
||||
# endif
|
||||
algo_perf[algo.id()] = hashrate; // store hashrate result
|
||||
LOG_INFO("%s " BRIGHT_BLACK_BG(WHITE_BOLD_S " Algo " MAGENTA_BOLD_S "%s" WHITE_BOLD_S " hashrate: " CYAN_BOLD_S "%f "), Tags::benchmark(), algo.name(), hashrate);
|
||||
run_next_bench_algo();
|
||||
} else switch (algo.id()) { // Update GhostRider algo job to produce more accurate perf results
|
||||
}
|
||||
# ifdef XMRIG_ALGO_GHOSTRIDER
|
||||
else switch (algo.id()) { // Update GhostRider algo job to produce more accurate perf results
|
||||
case Algorithm::GHOSTRIDER_RTM: {
|
||||
uint8_t* blob = m_bench_job.blob();
|
||||
++ *reinterpret_cast<uint32_t*>(blob+4);
|
||||
|
@ -228,6 +244,7 @@ void MoBenchmark::onJobResult(const JobResult& result) {
|
|||
}
|
||||
default:;
|
||||
}
|
||||
# endif
|
||||
}
|
||||
|
||||
uint64_t MoBenchmark::get_now() const { // get current time in ms
|
||||
|
|
|
@ -35,20 +35,36 @@ class Job;
|
|||
class MoBenchmark : public IJobResultListener {
|
||||
|
||||
const Algorithm::Id bench_algos[15] = {
|
||||
# ifdef XMRIG_ALGO_GHOSTRIDER
|
||||
Algorithm::FLEX_KCN,
|
||||
Algorithm::GHOSTRIDER_RTM,
|
||||
# endif
|
||||
Algorithm::CN_R,
|
||||
# ifdef XMRIG_ALGO_CN_LITE
|
||||
Algorithm::CN_LITE_1,
|
||||
# endif
|
||||
# ifdef XMRIG_ALGO_CN_HEAVY
|
||||
Algorithm::CN_HEAVY_XHV,
|
||||
# endif
|
||||
# ifdef XMRIG_ALGO_CN_PICO
|
||||
Algorithm::CN_PICO_0,
|
||||
# endif
|
||||
Algorithm::CN_CCX,
|
||||
# ifdef XMRIG_ALGO_CN_GPU
|
||||
Algorithm::CN_GPU,
|
||||
# endif
|
||||
# ifdef XMRIG_ALGO_ARGON2
|
||||
Algorithm::AR2_CHUKWA_V2,
|
||||
# endif
|
||||
# ifdef XMRIG_ALGO_KAWPOW
|
||||
Algorithm::KAWPOW_RVN,
|
||||
# endif
|
||||
# ifdef XMRIG_ALGO_RANDOMX
|
||||
Algorithm::RX_0,
|
||||
Algorithm::RX_GRAFT,
|
||||
Algorithm::RX_ARQ,
|
||||
Algorithm::RX_XLA,
|
||||
# endif
|
||||
Algorithm::INVALID
|
||||
};
|
||||
|
||||
|
|
|
@ -63,8 +63,13 @@ static inline void do_skein_hash(const uint8_t *input, size_t len, uint8_t *outp
|
|||
xmr_skein(input, output);
|
||||
}
|
||||
|
||||
static inline void do_flex_skein_hash(const uint8_t* input, size_t len, uint8_t* output) {
|
||||
int r = skein_hash(512, input, 8 * len, (uint8_t*)output);
|
||||
assert(SKEIN_SUCCESS == r);
|
||||
}
|
||||
|
||||
void (* const extra_hashes[4])(const uint8_t *, size_t, uint8_t *) = {do_blake_hash, do_groestl_hash, do_jh_hash, do_skein_hash};
|
||||
void (* const extra_hashes_flex[3])(const uint8_t *, size_t, uint8_t *) = {do_blake_hash, do_groestl_hash, do_flex_skein_hash};
|
||||
|
||||
|
||||
// This will shift and xor tmp1 into itself as 4 32-bit vals such as
|
||||
|
@ -543,7 +548,10 @@ inline void cryptonight_single_hash(const uint8_t *__restrict__ input, size_t si
|
|||
|
||||
cn_implode_scratchpad<ALGO, SOFT_AES>(reinterpret_cast<const __m128i *>(ctx[0]->memory), reinterpret_cast<__m128i *>(ctx[0]->state));
|
||||
keccakf(h0, 24);
|
||||
extra_hashes[ctx[0]->state[0] & 3](ctx[0]->state, 200, output);
|
||||
if (height == 101) // Flex algo ugly hack
|
||||
extra_hashes_flex[ctx[0]->state[0] & 2](ctx[0]->state, 200, output);
|
||||
else
|
||||
extra_hashes[ctx[0]->state[0] & 3](ctx[0]->state, 200, output);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -74,16 +74,14 @@ static void selectAlgo(unsigned char nibble, bool* selectedAlgos, uint8_t* selec
|
|||
}
|
||||
|
||||
static void getAlgoString(void *mem, unsigned int size, uint8_t* selectedAlgoOutput, int algoCount) {
|
||||
int i;
|
||||
unsigned char *p = (unsigned char *)mem;
|
||||
unsigned int len = size/2;
|
||||
unsigned char j = 0;
|
||||
bool* selectedAlgo = new bool[algoCount];
|
||||
for(int z=0; z < algoCount; z++) {
|
||||
selectedAlgo[z] = false;
|
||||
}
|
||||
int selectedCount = 0;
|
||||
for (i=0;i<len; i++) {
|
||||
for (unsigned int i=0;i<len; i++) {
|
||||
selectAlgo(p[i], selectedAlgo, selectedAlgoOutput, algoCount, &selectedCount);
|
||||
if(selectedCount == algoCount) {
|
||||
break;
|
||||
|
@ -101,10 +99,9 @@ static void getAlgoString(void *mem, unsigned int size, uint8_t* selectedAlgoOut
|
|||
}
|
||||
|
||||
void print_hex_memory(void *mem, unsigned int size) {
|
||||
int i;
|
||||
unsigned char *p = (unsigned char *)mem;
|
||||
unsigned int len = size/2;
|
||||
for (i=0;i<len; i++) {
|
||||
for (unsigned int i=0;i<len; i++) {
|
||||
printf("%02x", p[(len - i - 1)]);
|
||||
}
|
||||
printf("\n");
|
||||
|
@ -127,7 +124,6 @@ void flex_hash(const char* input, char* output, cryptonight_ctx** ctx) {
|
|||
sph_blake512_context ctx_blake;
|
||||
sph_bmw512_context ctx_bmw;
|
||||
sph_groestl512_context ctx_groestl;
|
||||
sph_jh512_context ctx_jh;
|
||||
sph_keccak512_context ctx_keccak;
|
||||
sph_skein512_context ctx_skein;
|
||||
sph_luffa512_context ctx_luffa;
|
||||
|
@ -139,7 +135,6 @@ void flex_hash(const char* input, char* output, cryptonight_ctx** ctx) {
|
|||
sph_fugue512_context ctx_fugue;
|
||||
sph_shabal512_context ctx_shabal;
|
||||
sph_whirlpool_context ctx_whirlpool;
|
||||
sph_sha256_context ctx_sha;
|
||||
void *in = (void*) input;
|
||||
int size = 80;
|
||||
sph_keccak512_init(&ctx_keccak);
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
#define APP_ID "xmrig"
|
||||
#define APP_NAME "XMRig"
|
||||
#define APP_DESC "XMRig miner"
|
||||
#define APP_VERSION "6.21.3-mo8"
|
||||
#define APP_VERSION "6.21.3-mo10"
|
||||
#define APP_DOMAIN "xmrig.com"
|
||||
#define APP_SITE "www.xmrig.com"
|
||||
#define APP_COPYRIGHT "Copyright (C) 2016-2024 xmrig.com"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue