diff --git a/src/backend/opencl/OclThread.cpp b/src/backend/opencl/OclThread.cpp index 8e4fb8449..d5fb36ea2 100644 --- a/src/backend/opencl/OclThread.cpp +++ b/src/backend/opencl/OclThread.cpp @@ -60,7 +60,7 @@ xmrig::OclThread::OclThread(const rapidjson::Value &value) # ifdef XMRIG_ALGO_RANDOMX m_bfactor = Json::getUint(value, kBFactor, 6); - m_gcnAsm = Json::getUint(value, kGCNAsm, m_gcnAsm); + m_gcnAsm = Json::getBool(value, kGCNAsm, m_gcnAsm); m_datasetHost = Json::getBool(value, kDatasetHost, m_datasetHost); # endif @@ -70,6 +70,8 @@ xmrig::OclThread::OclThread(const rapidjson::Value &value) m_memChunk = std::min(si[1].GetUint(), 18u); } else { + m_stridedIndex = 0; + m_memChunk = 0; m_fields.set(STRIDED_INDEX_FIELD, false); } diff --git a/src/backend/opencl/OclThread.h b/src/backend/opencl/OclThread.h index f219aed2e..d811898ce 100644 --- a/src/backend/opencl/OclThread.h +++ b/src/backend/opencl/OclThread.h @@ -96,7 +96,7 @@ private: inline void setIntensity(uint32_t intensity) { m_intensity = intensity / m_worksize * m_worksize; } bool m_datasetHost = false; - bool m_gcnAsm = false; + bool m_gcnAsm = true; std::bitset m_fields = 1; std::vector m_threads; uint32_t m_bfactor = 6; diff --git a/src/backend/opencl/kernels/rx/ExecuteVmKernel.cpp b/src/backend/opencl/kernels/rx/ExecuteVmKernel.cpp index 0b2968b1a..2963ce6e5 100644 --- a/src/backend/opencl/kernels/rx/ExecuteVmKernel.cpp +++ b/src/backend/opencl/kernels/rx/ExecuteVmKernel.cpp @@ -56,6 +56,8 @@ void xmrig::ExecuteVmKernel::setFirst(uint32_t first) void xmrig::ExecuteVmKernel::setIterations(uint32_t num_iterations) { setArg(5, sizeof(uint32_t), &num_iterations); + setFirst(1); + setLast(0); } diff --git a/src/backend/opencl/runners/OclRxBaseRunner.cpp b/src/backend/opencl/runners/OclRxBaseRunner.cpp index 6eab7c2c7..8fe9a4793 100644 --- a/src/backend/opencl/runners/OclRxBaseRunner.cpp +++ b/src/backend/opencl/runners/OclRxBaseRunner.cpp @@ -39,28 +39,25 @@ xmrig::OclRxBaseRunner::OclRxBaseRunner(size_t index, const OclLaunchData &data) : OclBaseRunner(index, data) { - uint32_t worksize = 0; - uint32_t gcn_version = 12; - switch (data.thread.worksize()) { case 2: case 4: case 8: case 16: - worksize = data.thread.worksize(); + m_worksize = data.thread.worksize(); break; default: - worksize = 8; + m_worksize = 8; } if (data.device.type() == OclDevice::Vega_10 || data.device.type() == OclDevice::Vega_20) { - gcn_version = 14; + m_gcn_version = 14; } m_options += " -DALGO=" + std::to_string(m_algorithm.id()); - m_options += " -DWORKERS_PER_HASH=" + std::to_string(worksize); - m_options += " -DGCN_VERSION=" + std::to_string(gcn_version); + m_options += " -DWORKERS_PER_HASH=" + std::to_string(m_worksize); + m_options += " -DGCN_VERSION=" + std::to_string(m_gcn_version); } diff --git a/src/backend/opencl/runners/OclRxBaseRunner.h b/src/backend/opencl/runners/OclRxBaseRunner.h index 996a3c07b..d8afdd702 100644 --- a/src/backend/opencl/runners/OclRxBaseRunner.h +++ b/src/backend/opencl/runners/OclRxBaseRunner.h @@ -69,6 +69,8 @@ protected: FillAesKernel *m_fillAes4Rx4_entropy = nullptr; FindSharesKernel *m_find_shares = nullptr; HashAesKernel *m_hashAes1Rx4 = nullptr; + uint32_t m_gcn_version = 12; + uint32_t m_worksize = 8; }; diff --git a/src/backend/opencl/runners/OclRxVmRunner.cpp b/src/backend/opencl/runners/OclRxVmRunner.cpp index 898fc20dc..6ed1e397a 100644 --- a/src/backend/opencl/runners/OclRxVmRunner.cpp +++ b/src/backend/opencl/runners/OclRxVmRunner.cpp @@ -32,8 +32,6 @@ #include "backend/opencl/wrappers/OclLib.h" #include "crypto/rx/RxAlgo.h" -#include "base/io/log/Log.h" - xmrig::OclRxVmRunner::OclRxVmRunner(size_t index, const OclLaunchData &data) : OclRxBaseRunner(index, data) { @@ -76,26 +74,17 @@ void xmrig::OclRxVmRunner::execute(uint32_t iteration) m_init_vm->enqueue(m_queue, g_intensity, iteration); -// LOG_WARN("bfactor:%u %u %u", bfactor, RxAlgo::programIterations(m_algorithm), num_iterations); - - uint32_t first = 1; - uint32_t last = 0; - m_execute_vm->setIterations(num_iterations); - m_execute_vm->setFirst(first); - m_execute_vm->setLast(last); for (int j = 0, n = 1 << bfactor; j < n; ++j) { if (j == n - 1) { - last = 1; - m_execute_vm->setLast(last); + m_execute_vm->setLast(1); } - m_execute_vm->enqueue(m_queue, g_intensity, data().thread.worksize()); + m_execute_vm->enqueue(m_queue, g_intensity, m_worksize); if (j == 0) { - first = 0; - m_execute_vm->setFirst(first); + m_execute_vm->setFirst(0); } } } diff --git a/src/net/JobResults.cpp b/src/net/JobResults.cpp index 4a6f87e9b..c6bd68bb4 100644 --- a/src/net/JobResults.cpp +++ b/src/net/JobResults.cpp @@ -53,8 +53,6 @@ #include #include -#include "base/tools/Chrono.h" - namespace xmrig {