Show GPU # when compute error happens
This commit is contained in:
parent
f7d1d50a25
commit
5324761e06
6 changed files with 21 additions and 13 deletions
|
@ -27,6 +27,7 @@
|
|||
#include "backend/cuda/CudaWorker.h"
|
||||
#include "backend/common/Tags.h"
|
||||
#include "backend/cuda/runners/CudaCnRunner.h"
|
||||
#include "backend/cuda/wrappers/CudaDevice.h"
|
||||
#include "base/io/log/Log.h"
|
||||
#include "base/tools/Chrono.h"
|
||||
#include "core/Miner.h"
|
||||
|
@ -71,7 +72,8 @@ static inline uint32_t roundSize(uint32_t intensity) { return kReserveCount / in
|
|||
xmrig::CudaWorker::CudaWorker(size_t id, const CudaLaunchData &data) :
|
||||
Worker(id, data.thread.affinity(), -1),
|
||||
m_algorithm(data.algorithm),
|
||||
m_miner(data.miner)
|
||||
m_miner(data.miner),
|
||||
m_deviceIndex(data.device.index())
|
||||
{
|
||||
switch (m_algorithm.family()) {
|
||||
case Algorithm::RANDOM_X:
|
||||
|
@ -165,7 +167,7 @@ void xmrig::CudaWorker::start()
|
|||
}
|
||||
|
||||
if (foundCount) {
|
||||
JobResults::submit(m_job.currentJob(), foundNonce, foundCount);
|
||||
JobResults::submit(m_job.currentJob(), foundNonce, foundCount, m_deviceIndex);
|
||||
}
|
||||
|
||||
const size_t batch_size = intensity();
|
||||
|
|
|
@ -66,6 +66,7 @@ private:
|
|||
const Miner *m_miner;
|
||||
ICudaRunner *m_runner = nullptr;
|
||||
WorkerJob<1> m_job;
|
||||
uint32_t m_deviceIndex;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -79,7 +79,8 @@ xmrig::OclWorker::OclWorker(size_t id, const OclLaunchData &data) :
|
|||
m_algorithm(data.algorithm),
|
||||
m_miner(data.miner),
|
||||
m_intensity(data.thread.intensity()),
|
||||
m_sharedData(OclSharedState::get(data.device.index()))
|
||||
m_sharedData(OclSharedState::get(data.device.index())),
|
||||
m_deviceIndex(data.device.index())
|
||||
{
|
||||
switch (m_algorithm.family()) {
|
||||
case Algorithm::RANDOM_X:
|
||||
|
@ -200,7 +201,7 @@ void xmrig::OclWorker::start()
|
|||
}
|
||||
|
||||
if (results[0xFF] > 0) {
|
||||
JobResults::submit(m_job.currentJob(), results, results[0xFF]);
|
||||
JobResults::submit(m_job.currentJob(), results, results[0xFF], m_deviceIndex);
|
||||
}
|
||||
|
||||
if (!Nonce::isOutdated(Nonce::OPENCL, m_job.sequence()) && !m_job.nextRound(roundSize(runnerRoundSize), runnerRoundSize)) {
|
||||
|
|
|
@ -69,6 +69,7 @@ private:
|
|||
IOclRunner *m_runner = nullptr;
|
||||
OclSharedData &m_sharedData;
|
||||
WorkerJob<1> m_job;
|
||||
uint32_t m_deviceIndex;
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue