Reduced memory for KawPow

This commit is contained in:
SChernykh 2020-06-05 14:01:49 +02:00
parent ba405d1984
commit 0dbf41f761
6 changed files with 42 additions and 17 deletions

View file

@ -66,14 +66,15 @@ bool xmrig::CudaKawPowRunner::set(const Job &job, uint8_t *blob)
const uint64_t start_ms = Chrono::steadyMSecs();
const bool result = CudaLib::kawPowPrepare(m_ctx, cache.data(), cache.size(), cache.dag_size(epoch), height, dag_sizes);
const bool result = CudaLib::kawPowPrepare(m_ctx, cache.data(), cache.size(), cache.l1_cache(), cache.dag_size(epoch), height, dag_sizes);
if (!result) {
LOG_ERR("Failed to initialize DAG: %s", CudaLib::lastError(m_ctx));
}
const int64_t dt = Chrono::steadyMSecs() - start_ms;
if (dt > 1000) {
LOG_INFO("%s " YELLOW("KawPow") " DAG for epoch " WHITE_BOLD("%u") " calculated " BLACK_BOLD("(%" PRIu64 "ms)"), Tags::nvidia(), epoch, dt);
else {
const int64_t dt = Chrono::steadyMSecs() - start_ms;
if (dt > 1000) {
LOG_INFO("%s " YELLOW("KawPow") " DAG for epoch " WHITE_BOLD("%u") " calculated " BLACK_BOLD("(%" PRIu64 "ms)"), Tags::nvidia(), epoch, dt);
}
}
return result;