mirror of
https://github.com/xmrig/xmrig.git
synced 2024-12-23 12:09:22 +00:00
Merge remote-tracking branch 'upstream/evo' into evo
This commit is contained in:
commit
2e3d087750
6 changed files with 50 additions and 102 deletions
|
@ -45,8 +45,6 @@
|
||||||
#include "base/tools/String.h"
|
#include "base/tools/String.h"
|
||||||
#include "core/config/Config.h"
|
#include "core/config/Config.h"
|
||||||
#include "core/Controller.h"
|
#include "core/Controller.h"
|
||||||
#include "crypto/kawpow/KPCache.h"
|
|
||||||
#include "crypto/kawpow/KPHash.h"
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef XMRIG_ALGO_ASTROBWT
|
#ifdef XMRIG_ALGO_ASTROBWT
|
||||||
|
@ -207,7 +205,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline void start(const Job &job)
|
inline void start(const Job &)
|
||||||
{
|
{
|
||||||
LOG_INFO("%s use profile " BLUE_BG(WHITE_BOLD_S " %s ") WHITE_BOLD_S " (" CYAN_BOLD("%zu") WHITE_BOLD(" thread%s)") " scratchpad " CYAN_BOLD("%zu KB"),
|
LOG_INFO("%s use profile " BLUE_BG(WHITE_BOLD_S " %s ") WHITE_BOLD_S " (" CYAN_BOLD("%zu") WHITE_BOLD(" thread%s)") " scratchpad " CYAN_BOLD("%zu KB"),
|
||||||
Tags::nvidia(),
|
Tags::nvidia(),
|
||||||
|
@ -217,7 +215,7 @@ public:
|
||||||
algo.l3() / 1024
|
algo.l3() / 1024
|
||||||
);
|
);
|
||||||
|
|
||||||
Log::print(WHITE_BOLD("| # | GPU | BUS ID | I | W | SI | MC | U | MEM | NAME"));
|
Log::print(WHITE_BOLD("| # | GPU | BUS ID | INTENSITY | THREADS | BLOCKS | BF | BS | MEMORY | NAME"));
|
||||||
|
|
||||||
size_t algo_l3 = algo.l3();
|
size_t algo_l3 = algo.l3();
|
||||||
|
|
||||||
|
@ -229,17 +227,8 @@ public:
|
||||||
|
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
for (const auto &data : threads) {
|
for (const auto &data : threads) {
|
||||||
size_t mem_used = (data.thread.threads() * data.thread.blocks()) * algo_l3 / oneMiB;
|
Log::print("|" CYAN_BOLD("%3zu") " |" CYAN_BOLD("%4u") " |" YELLOW(" %7s") " |" CYAN_BOLD("%10d") " |" CYAN_BOLD("%8d") " |"
|
||||||
|
CYAN_BOLD("%7d") " |" CYAN_BOLD("%3d") " |" CYAN_BOLD("%4d") " |" CYAN("%7zu") " | " GREEN("%s"),
|
||||||
# ifdef XMRIG_ALGO_KAWPOW
|
|
||||||
if (algo.family() == Algorithm::KAWPOW) {
|
|
||||||
const uint32_t epoch = job.height() / KPHash::EPOCH_LENGTH;
|
|
||||||
mem_used = (KPCache::cache_size(epoch) + KPCache::dag_size(epoch)) / oneMiB;
|
|
||||||
}
|
|
||||||
# endif
|
|
||||||
|
|
||||||
Log::print("|" CYAN_BOLD("%3zu") " |" CYAN_BOLD("%4u") " |" YELLOW(" %7s") " |" CYAN_BOLD("%9d") " |" CYAN_BOLD("%4d") " |"
|
|
||||||
CYAN_BOLD("%4d") " |" CYAN_BOLD("%3d") " |" CYAN_BOLD("%4d") " |" CYAN("%5zu") " | " GREEN("%s"),
|
|
||||||
i,
|
i,
|
||||||
data.thread.index(),
|
data.thread.index(),
|
||||||
data.device.topology().toString().data(),
|
data.device.topology().toString().data(),
|
||||||
|
@ -248,7 +237,7 @@ public:
|
||||||
data.thread.blocks(),
|
data.thread.blocks(),
|
||||||
data.thread.bfactor(),
|
data.thread.bfactor(),
|
||||||
data.thread.bsleep(),
|
data.thread.bsleep(),
|
||||||
mem_used,
|
(data.thread.threads() * data.thread.blocks()) * algo_l3 / oneMiB,
|
||||||
data.device.name().data()
|
data.device.name().data()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -379,30 +368,18 @@ void xmrig::CudaBackend::printHashrate(bool details)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
char num[16 * 3] = { 0 };
|
char num[8 * 3] = { 0 };
|
||||||
|
|
||||||
const double hashrate_short = hashrate()->calc(Hashrate::ShortInterval);
|
Log::print(WHITE_BOLD_S "| CUDA # | AFFINITY | 10s H/s | 60s H/s | 15m H/s |");
|
||||||
const double hashrate_medium = hashrate()->calc(Hashrate::MediumInterval);
|
|
||||||
const double hashrate_large = hashrate()->calc(Hashrate::LargeInterval);
|
|
||||||
|
|
||||||
double scale = 1.0;
|
|
||||||
const char* h = " H/s";
|
|
||||||
|
|
||||||
if ((hashrate_short >= 1e6) || (hashrate_medium >= 1e6) || (hashrate_large >= 1e6)) {
|
|
||||||
scale = 1e-6;
|
|
||||||
h = "MH/s";
|
|
||||||
}
|
|
||||||
|
|
||||||
Log::print(WHITE_BOLD_S "| CUDA # | AFFINITY | 10s %s | 60s %s | 15m %s |", h, h, h);
|
|
||||||
|
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
for (const auto &data : d_ptr->threads) {
|
for (const auto &data : d_ptr->threads) {
|
||||||
Log::print("| %8zu | %8" PRId64 " | %8s | %8s | %8s |" CYAN_BOLD(" #%u") YELLOW(" %s") GREEN(" %s"),
|
Log::print("| %8zu | %8" PRId64 " | %7s | %7s | %7s |" CYAN_BOLD(" #%u") YELLOW(" %s") GREEN(" %s"),
|
||||||
i,
|
i,
|
||||||
data.thread.affinity(),
|
data.thread.affinity(),
|
||||||
Hashrate::format(hashrate()->calc(i, Hashrate::ShortInterval) * scale, num, sizeof num / 3),
|
Hashrate::format(hashrate()->calc(i, Hashrate::ShortInterval), num, sizeof num / 3),
|
||||||
Hashrate::format(hashrate()->calc(i, Hashrate::MediumInterval) * scale, num + 16, sizeof num / 3),
|
Hashrate::format(hashrate()->calc(i, Hashrate::MediumInterval), num + 8, sizeof num / 3),
|
||||||
Hashrate::format(hashrate()->calc(i, Hashrate::LargeInterval) * scale, num + 16 * 2, sizeof num / 3),
|
Hashrate::format(hashrate()->calc(i, Hashrate::LargeInterval), num + 8 * 2, sizeof num / 3),
|
||||||
data.device.index(),
|
data.device.index(),
|
||||||
data.device.topology().toString().data(),
|
data.device.topology().toString().data(),
|
||||||
data.device.name().data()
|
data.device.name().data()
|
||||||
|
@ -411,10 +388,10 @@ void xmrig::CudaBackend::printHashrate(bool details)
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log::print(WHITE_BOLD_S "| - | - | %8s | %8s | %8s |",
|
Log::print(WHITE_BOLD_S "| - | - | %7s | %7s | %7s |",
|
||||||
Hashrate::format(hashrate()->calc(Hashrate::ShortInterval) * scale, num, sizeof num / 3),
|
Hashrate::format(hashrate()->calc(Hashrate::ShortInterval), num, sizeof num / 3),
|
||||||
Hashrate::format(hashrate()->calc(Hashrate::MediumInterval) * scale, num + 16, sizeof num / 3),
|
Hashrate::format(hashrate()->calc(Hashrate::MediumInterval), num + 8, sizeof num / 3),
|
||||||
Hashrate::format(hashrate()->calc(Hashrate::LargeInterval) * scale, num + 16 * 2, sizeof num / 3)
|
Hashrate::format(hashrate()->calc(Hashrate::LargeInterval), num + 8 * 2, sizeof num / 3)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -24,17 +24,16 @@
|
||||||
|
|
||||||
|
|
||||||
#include "backend/cuda/runners/CudaKawPowRunner.h"
|
#include "backend/cuda/runners/CudaKawPowRunner.h"
|
||||||
|
#include "3rdparty/libethash/data_sizes.h"
|
||||||
#include "backend/cuda/CudaLaunchData.h"
|
#include "backend/cuda/CudaLaunchData.h"
|
||||||
#include "backend/cuda/wrappers/CudaLib.h"
|
#include "backend/cuda/wrappers/CudaLib.h"
|
||||||
#include "base/io/log/Log.h"
|
#include "base/io/log/Log.h"
|
||||||
|
#include "base/io/log/Tags.h"
|
||||||
#include "base/net/stratum/Job.h"
|
#include "base/net/stratum/Job.h"
|
||||||
#include "base/tools/Chrono.h"
|
#include "base/tools/Chrono.h"
|
||||||
|
|
||||||
#include "crypto/kawpow/KPCache.h"
|
#include "crypto/kawpow/KPCache.h"
|
||||||
#include "crypto/kawpow/KPHash.h"
|
#include "crypto/kawpow/KPHash.h"
|
||||||
|
|
||||||
#include "3rdparty/libethash/data_sizes.h"
|
|
||||||
|
|
||||||
|
|
||||||
xmrig::CudaKawPowRunner::CudaKawPowRunner(size_t index, const CudaLaunchData &data) :
|
xmrig::CudaKawPowRunner::CudaKawPowRunner(size_t index, const CudaLaunchData &data) :
|
||||||
CudaBaseRunner(index, data)
|
CudaBaseRunner(index, data)
|
||||||
|
@ -71,7 +70,7 @@ bool xmrig::CudaKawPowRunner::set(const Job &job, uint8_t *blob)
|
||||||
|
|
||||||
const int64_t dt = Chrono::steadyMSecs() - start_ms;
|
const int64_t dt = Chrono::steadyMSecs() - start_ms;
|
||||||
if (dt > 500) {
|
if (dt > 500) {
|
||||||
LOG_INFO("KawPow DAG for epoch %u calculated (%" PRIu64 " ms)", epoch, dt);
|
LOG_INFO("%s " YELLOW("KawPow") " DAG for epoch " WHITE_BOLD("%u") " calculated " BLACK_BOLD("(%" PRIu64 "ms)"), Tags::nvidia(), epoch, dt);
|
||||||
}
|
}
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|
|
@ -47,8 +47,6 @@
|
||||||
#include "base/tools/String.h"
|
#include "base/tools/String.h"
|
||||||
#include "core/config/Config.h"
|
#include "core/config/Config.h"
|
||||||
#include "core/Controller.h"
|
#include "core/Controller.h"
|
||||||
#include "crypto/kawpow/KPCache.h"
|
|
||||||
#include "crypto/kawpow/KPHash.h"
|
|
||||||
|
|
||||||
|
|
||||||
#ifdef XMRIG_FEATURE_API
|
#ifdef XMRIG_FEATURE_API
|
||||||
|
@ -203,7 +201,7 @@ public:
|
||||||
algo.l3() / 1024
|
algo.l3() / 1024
|
||||||
);
|
);
|
||||||
|
|
||||||
Log::print(WHITE_BOLD("| # | GPU | BUS ID | I | W | SI | MC | U | MEM | NAME"));
|
Log::print(WHITE_BOLD("| # | GPU | BUS ID | INTENSITY | WSIZE | MEMORY | NAME"));
|
||||||
|
|
||||||
size_t algo_l3 = algo.l3();
|
size_t algo_l3 = algo.l3();
|
||||||
|
|
||||||
|
@ -215,26 +213,14 @@ public:
|
||||||
|
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
for (const auto &data : threads) {
|
for (const auto &data : threads) {
|
||||||
size_t mem_used = data.thread.intensity() * algo_l3 / oneMiB;
|
Log::print("|" CYAN_BOLD("%3zu") " |" CYAN_BOLD("%4u") " |" YELLOW(" %7s") " |" CYAN_BOLD("%10u") " |" CYAN_BOLD("%6u") " |"
|
||||||
|
CYAN("%7zu") " | %s",
|
||||||
# ifdef XMRIG_ALGO_KAWPOW
|
|
||||||
if (algo.family() == Algorithm::KAWPOW) {
|
|
||||||
const uint32_t epoch = job.height() / KPHash::EPOCH_LENGTH;
|
|
||||||
mem_used = (KPCache::cache_size(epoch) + KPCache::dag_size(epoch)) / oneMiB;
|
|
||||||
}
|
|
||||||
# endif
|
|
||||||
|
|
||||||
Log::print("|" CYAN_BOLD("%3zu") " |" CYAN_BOLD("%4u") " |" YELLOW(" %7s") " |" CYAN_BOLD("%9u") " |" CYAN_BOLD("%4u") " |"
|
|
||||||
CYAN_BOLD("%3u") " |" CYAN_BOLD("%3s") " |" CYAN_BOLD("%3u") " |" CYAN("%5zu") " | %s",
|
|
||||||
i,
|
i,
|
||||||
data.thread.index(),
|
data.thread.index(),
|
||||||
data.device.topology().toString().data(),
|
data.device.topology().toString().data(),
|
||||||
data.thread.intensity(),
|
data.thread.intensity(),
|
||||||
data.thread.worksize(),
|
data.thread.worksize(),
|
||||||
data.thread.stridedIndex(),
|
data.thread.intensity() * algo_l3 / oneMiB,
|
||||||
data.thread.stridedIndex() == 2 ? std::to_string(data.thread.memChunk()).c_str() : "-",
|
|
||||||
data.thread.unrollFactor(),
|
|
||||||
mem_used,
|
|
||||||
data.device.printableName().data()
|
data.device.printableName().data()
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -360,30 +346,18 @@ void xmrig::OclBackend::printHashrate(bool details)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
char num[16 * 3] = { 0 };
|
char num[8 * 3] = { 0 };
|
||||||
|
|
||||||
const double hashrate_short = hashrate()->calc(Hashrate::ShortInterval);
|
Log::print(WHITE_BOLD_S "| OPENCL # | AFFINITY | 10s H/s | 60s H/s | 15m H/s |");
|
||||||
const double hashrate_medium = hashrate()->calc(Hashrate::MediumInterval);
|
|
||||||
const double hashrate_large = hashrate()->calc(Hashrate::LargeInterval);
|
|
||||||
|
|
||||||
double scale = 1.0;
|
|
||||||
const char* h = " H/s";
|
|
||||||
|
|
||||||
if ((hashrate_short >= 1e6) || (hashrate_medium >= 1e6) || (hashrate_large >= 1e6)) {
|
|
||||||
scale = 1e-6;
|
|
||||||
h = "MH/s";
|
|
||||||
}
|
|
||||||
|
|
||||||
Log::print(WHITE_BOLD_S "| OPENCL # | AFFINITY | 10s %s | 60s %s | 15m %s |", h, h, h);
|
|
||||||
|
|
||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
for (const auto &data : d_ptr->threads) {
|
for (const auto &data : d_ptr->threads) {
|
||||||
Log::print("| %8zu | %8" PRId64 " | %8s | %8s | %8s |" CYAN_BOLD(" #%u") YELLOW(" %s") " %s",
|
Log::print("| %8zu | %8" PRId64 " | %7s | %7s | %7s |" CYAN_BOLD(" #%u") YELLOW(" %s") " %s",
|
||||||
i,
|
i,
|
||||||
data.affinity,
|
data.affinity,
|
||||||
Hashrate::format(hashrate()->calc(i, Hashrate::ShortInterval) * scale, num, sizeof num / 3),
|
Hashrate::format(hashrate()->calc(i, Hashrate::ShortInterval), num, sizeof num / 3),
|
||||||
Hashrate::format(hashrate()->calc(i, Hashrate::MediumInterval) * scale, num + 16, sizeof num / 3),
|
Hashrate::format(hashrate()->calc(i, Hashrate::MediumInterval), num + 8, sizeof num / 3),
|
||||||
Hashrate::format(hashrate()->calc(i, Hashrate::LargeInterval) * scale, num + 16 * 2, sizeof num / 3),
|
Hashrate::format(hashrate()->calc(i, Hashrate::LargeInterval), num + 8 * 2, sizeof num / 3),
|
||||||
data.device.index(),
|
data.device.index(),
|
||||||
data.device.topology().toString().data(),
|
data.device.topology().toString().data(),
|
||||||
data.device.printableName().data()
|
data.device.printableName().data()
|
||||||
|
@ -392,10 +366,10 @@ void xmrig::OclBackend::printHashrate(bool details)
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
Log::print(WHITE_BOLD_S "| - | - | %8s | %8s | %8s |",
|
Log::print(WHITE_BOLD_S "| - | - | %7s | %7s | %7s |",
|
||||||
Hashrate::format(hashrate()->calc(Hashrate::ShortInterval) * scale, num, sizeof num / 3),
|
Hashrate::format(hashrate()->calc(Hashrate::ShortInterval), num, sizeof num / 3),
|
||||||
Hashrate::format(hashrate()->calc(Hashrate::MediumInterval) * scale, num + 16, sizeof num / 3),
|
Hashrate::format(hashrate()->calc(Hashrate::MediumInterval), num + 8, sizeof num / 3),
|
||||||
Hashrate::format(hashrate()->calc(Hashrate::LargeInterval) * scale, num + 16 * 2, sizeof num / 3)
|
Hashrate::format(hashrate()->calc(Hashrate::LargeInterval), num + 8 * 2, sizeof num / 3)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -23,23 +23,22 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include "backend/common/Tags.h"
|
|
||||||
#include "backend/opencl/kernels/kawpow/KawPow_CalculateDAGKernel.h"
|
|
||||||
#include "backend/opencl/runners/OclKawPowRunner.h"
|
#include "backend/opencl/runners/OclKawPowRunner.h"
|
||||||
#include "backend/opencl/runners/tools/OclKawPow.h"
|
#include "backend/common/Tags.h"
|
||||||
|
#include "3rdparty/libethash/ethash_internal.h"
|
||||||
|
#include "backend/opencl/kernels/kawpow/KawPow_CalculateDAGKernel.h"
|
||||||
#include "backend/opencl/OclLaunchData.h"
|
#include "backend/opencl/OclLaunchData.h"
|
||||||
|
#include "backend/opencl/runners/tools/OclKawPow.h"
|
||||||
#include "backend/opencl/wrappers/OclError.h"
|
#include "backend/opencl/wrappers/OclError.h"
|
||||||
#include "backend/opencl/wrappers/OclLib.h"
|
#include "backend/opencl/wrappers/OclLib.h"
|
||||||
#include "base/io/log/Log.h"
|
#include "base/io/log/Log.h"
|
||||||
#include "base/net/stratum/Job.h"
|
|
||||||
|
|
||||||
#include "base/io/log/Log.h"
|
#include "base/io/log/Log.h"
|
||||||
|
#include "base/io/log/Tags.h"
|
||||||
|
#include "base/net/stratum/Job.h"
|
||||||
#include "base/tools/Chrono.h"
|
#include "base/tools/Chrono.h"
|
||||||
#include "crypto/common/VirtualMemory.h"
|
#include "crypto/common/VirtualMemory.h"
|
||||||
#include "crypto/kawpow/KPHash.h"
|
#include "crypto/kawpow/KPHash.h"
|
||||||
|
|
||||||
#include "3rdparty/libethash/ethash_internal.h"
|
|
||||||
|
|
||||||
|
|
||||||
namespace xmrig {
|
namespace xmrig {
|
||||||
|
|
||||||
|
@ -156,7 +155,7 @@ void OclKawPowRunner::set(const Job &job, uint8_t *blob)
|
||||||
|
|
||||||
OclLib::finish(m_queue);
|
OclLib::finish(m_queue);
|
||||||
|
|
||||||
LOG_INFO("KawPow DAG for epoch %u calculated (%" PRIu64 " ms)", epoch, Chrono::steadyMSecs() - start_ms);
|
LOG_INFO("%s " YELLOW("KawPow") " DAG for epoch " WHITE_BOLD("%u") " calculated " BLACK_BOLD("(%" PRIu64 "ms)"), Tags::opencl(), epoch, Chrono::steadyMSecs() - start_ms);
|
||||||
}
|
}
|
||||||
|
|
||||||
const uint64_t target = job.target();
|
const uint64_t target = job.target();
|
||||||
|
|
|
@ -23,7 +23,8 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "backend/opencl/runners/tools/OclKawPow.h"
|
#include "backend/opencl/runners/tools/OclKawPow.h"
|
||||||
|
#include "3rdparty/libethash/data_sizes.h"
|
||||||
|
#include "3rdparty/libethash/ethash_internal.h"
|
||||||
#include "backend/opencl/cl/kawpow/kawpow_cl.h"
|
#include "backend/opencl/cl/kawpow/kawpow_cl.h"
|
||||||
#include "backend/opencl/interfaces/IOclRunner.h"
|
#include "backend/opencl/interfaces/IOclRunner.h"
|
||||||
#include "backend/opencl/OclCache.h"
|
#include "backend/opencl/OclCache.h"
|
||||||
|
@ -32,13 +33,11 @@
|
||||||
#include "backend/opencl/wrappers/OclError.h"
|
#include "backend/opencl/wrappers/OclError.h"
|
||||||
#include "backend/opencl/wrappers/OclLib.h"
|
#include "backend/opencl/wrappers/OclLib.h"
|
||||||
#include "base/io/log/Log.h"
|
#include "base/io/log/Log.h"
|
||||||
|
#include "base/io/log/Tags.h"
|
||||||
#include "base/tools/Baton.h"
|
#include "base/tools/Baton.h"
|
||||||
#include "base/tools/Chrono.h"
|
#include "base/tools/Chrono.h"
|
||||||
#include "crypto/kawpow/KPHash.h"
|
#include "crypto/kawpow/KPHash.h"
|
||||||
|
|
||||||
#include "3rdparty/libethash/ethash_internal.h"
|
|
||||||
#include "3rdparty/libethash/data_sizes.h"
|
|
||||||
|
|
||||||
|
|
||||||
#include <cstring>
|
#include <cstring>
|
||||||
#include <mutex>
|
#include <mutex>
|
||||||
|
@ -200,7 +199,7 @@ public:
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG_INFO("KawPow program for period %" PRIu64 " compiled. (%" PRIu64 "ms)", period, Chrono::steadyMSecs() - ts);
|
LOG_INFO("%s " YELLOW("KawPow") " program for period " WHITE_BOLD("%" PRIu64) " compiled " BLACK_BOLD("(%" PRIu64 "ms)"), Tags::opencl(), period, Chrono::steadyMSecs() - ts);
|
||||||
|
|
||||||
cache.add(runner.algorithm(), period, worksize, runner.deviceIndex(), program);
|
cache.add(runner.algorithm(), period, worksize, runner.deviceIndex(), program);
|
||||||
|
|
||||||
|
@ -238,7 +237,7 @@ private:
|
||||||
int mix_seq_dst_cnt = 0;
|
int mix_seq_dst_cnt = 0;
|
||||||
int mix_seq_cache_cnt = 0;
|
int mix_seq_cache_cnt = 0;
|
||||||
|
|
||||||
for (int i = 0; i < KPHash::REGS; i++) {
|
for (uint32_t i = 0; i < KPHash::REGS; i++) {
|
||||||
mix_seq_dst[i] = i;
|
mix_seq_dst[i] = i;
|
||||||
mix_seq_cache[i] = i;
|
mix_seq_cache[i] = i;
|
||||||
}
|
}
|
||||||
|
@ -286,7 +285,7 @@ private:
|
||||||
ret << merge("mix[0]", "data_dag.s[0]", rnd());
|
ret << merge("mix[0]", "data_dag.s[0]", rnd());
|
||||||
|
|
||||||
constexpr size_t num_words_per_lane = 256 / (sizeof(uint32_t) * KPHash::LANES);
|
constexpr size_t num_words_per_lane = 256 / (sizeof(uint32_t) * KPHash::LANES);
|
||||||
for (int i = 1; i < num_words_per_lane; i++)
|
for (size_t i = 1; i < num_words_per_lane; i++)
|
||||||
{
|
{
|
||||||
std::string dest = mix_dst();
|
std::string dest = mix_dst();
|
||||||
uint32_t r = rnd();
|
uint32_t r = rnd();
|
||||||
|
|
|
@ -27,14 +27,14 @@
|
||||||
|
|
||||||
#include <cinttypes>
|
#include <cinttypes>
|
||||||
|
|
||||||
#include "3rdparty/libethash/ethash.h"
|
#include "crypto/kawpow/KPCache.h"
|
||||||
#include "3rdparty/libethash/ethash_internal.h"
|
|
||||||
#include "3rdparty/libethash/data_sizes.h"
|
#include "3rdparty/libethash/data_sizes.h"
|
||||||
|
#include "3rdparty/libethash/ethash_internal.h"
|
||||||
|
#include "3rdparty/libethash/ethash.h"
|
||||||
#include "base/io/log/Log.h"
|
#include "base/io/log/Log.h"
|
||||||
|
#include "base/io/log/Tags.h"
|
||||||
#include "base/tools/Chrono.h"
|
#include "base/tools/Chrono.h"
|
||||||
#include "crypto/common/VirtualMemory.h"
|
#include "crypto/common/VirtualMemory.h"
|
||||||
#include "crypto/kawpow/KPCache.h"
|
|
||||||
|
|
||||||
|
|
||||||
namespace xmrig {
|
namespace xmrig {
|
||||||
|
@ -90,7 +90,7 @@ bool KPCache::init(uint32_t epoch)
|
||||||
m_size = size;
|
m_size = size;
|
||||||
m_epoch = epoch;
|
m_epoch = epoch;
|
||||||
|
|
||||||
LOG_INFO("KawPow light cache for epoch %u calculated (%" PRIu64 " ms)", epoch, Chrono::steadyMSecs() - start_ms);
|
LOG_INFO("%s " YELLOW("KawPow") " light cache for epoch " WHITE_BOLD("%u") " calculated " BLACK_BOLD("(%" PRIu64 "ms)"), Tags::miner(), epoch, Chrono::steadyMSecs() - start_ms);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue