mirror of
https://github.com/xmrig/xmrig.git
synced 2025-01-11 05:14:40 +00:00
Fixes for Intel OpenCL platform.
This commit is contained in:
parent
133cd30b2e
commit
e8ee091e5a
4 changed files with 10 additions and 5 deletions
|
@ -45,7 +45,13 @@ static inline uint32_t getMaxThreads(const OclDevice &device, const Algorithm &a
|
|||
return 40000u;
|
||||
}
|
||||
|
||||
return ((algorithm.l3() <= oneMiB) ? 2u : 1u) * 1000u;
|
||||
const uint32_t ratio = (algorithm.l3() <= oneMiB) ? 2u : 1u;
|
||||
|
||||
if (device.vendorId() == OCL_VENDOR_INTEL) {
|
||||
return ratio * device.computeUnits() * 8;
|
||||
}
|
||||
|
||||
return ratio * 1000u;
|
||||
}
|
||||
|
||||
|
||||
|
@ -107,7 +113,7 @@ bool ocl_generic_cn_generator(const OclDevice &device, const Algorithm &algorith
|
|||
return false;
|
||||
}
|
||||
|
||||
const uint32_t threadCount = ((device.globalMemSize() - intensity * 2 * algorithm.l3()) > 128 * oneMiB) ? 2 : 1;
|
||||
const uint32_t threadCount = (device.vendorId() == OCL_VENDOR_AMD && (device.globalMemSize() - intensity * 2 * algorithm.l3()) > 128 * oneMiB) ? 2 : 1;
|
||||
|
||||
threads.add(OclThread(device.index(), intensity, 8, getStridedIndex(device, algorithm), 2, threadCount, 8));
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ bool ocl_generic_rx_generator(const OclDevice &device, const Algorithm &algorith
|
|||
return false;
|
||||
}
|
||||
|
||||
threads.add(OclThread(device.index(), intensity, 8, 2, gcnAsm, datasetHost, 6));
|
||||
threads.add(OclThread(device.index(), intensity, 8, device.vendorId() == OCL_VENDOR_AMD ? 2 : 1, gcnAsm, datasetHost, 6));
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -98,7 +98,7 @@ void xmrig::OclBaseRunner::init()
|
|||
constexpr size_t oneGiB = 1024 * 1024 * 1024;
|
||||
size_t size = bufferSize();
|
||||
|
||||
if (size < oneGiB && data().device.freeMemSize() >= oneGiB) {
|
||||
if (size < oneGiB && data().device.vendorId() == OCL_VENDOR_AMD && data().device.freeMemSize() >= oneGiB) {
|
||||
size = oneGiB;
|
||||
}
|
||||
|
||||
|
|
|
@ -75,7 +75,6 @@ xmrig::OclCnRunner::~OclCnRunner()
|
|||
}
|
||||
|
||||
if (m_algorithm == Algorithm::CN_R) {
|
||||
OclLib::release(m_cnr);
|
||||
OclCnR::clear();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue