mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-17 18:20:51 +00:00
Always create the largest possible padbuffer for scrypt kernels even if not needed for thread_concurrency, giving us some headroom for intensity levels.
This commit is contained in:
parent
d8f81c18ee
commit
3a0d60cfe1
7
ocl.c
7
ocl.c
@ -773,11 +773,14 @@ built:
|
|||||||
size_t ipt = (1024 / gpus[gpu].lookup_gap + (1024 % gpus[gpu].lookup_gap > 0));
|
size_t ipt = (1024 / gpus[gpu].lookup_gap + (1024 % gpus[gpu].lookup_gap > 0));
|
||||||
size_t bufsize = 128 * ipt * gpus[gpu].thread_concurrency;
|
size_t bufsize = 128 * ipt * gpus[gpu].thread_concurrency;
|
||||||
|
|
||||||
applog(LOG_DEBUG, "Creating scrypt buffer sized %d", bufsize);
|
/* Always allocate the largest possible buffer allowed, even if we're not initially requiring it
|
||||||
|
* based on thread_concurrency, giving us some headroom for intensity levels. */
|
||||||
if (bufsize > gpus[gpu].max_alloc) {
|
if (bufsize > gpus[gpu].max_alloc) {
|
||||||
applog(LOG_WARNING, "Maximum buffer memory device %d supports says %u, your scrypt settings come to %u",
|
applog(LOG_WARNING, "Maximum buffer memory device %d supports says %u, your scrypt settings come to %u",
|
||||||
gpu, gpus[gpu].max_alloc, bufsize);
|
gpu, gpus[gpu].max_alloc, bufsize);
|
||||||
}
|
} else
|
||||||
|
bufsize = gpus[gpu].max_alloc;
|
||||||
|
applog(LOG_DEBUG, "Creating scrypt buffer sized %d", bufsize);
|
||||||
clState->padbufsize = bufsize;
|
clState->padbufsize = bufsize;
|
||||||
clState->padbuffer8 = clCreateBuffer(clState->context, CL_MEM_READ_WRITE, bufsize, NULL, &status);
|
clState->padbuffer8 = clCreateBuffer(clState->context, CL_MEM_READ_WRITE, bufsize, NULL, &status);
|
||||||
if (status != CL_SUCCESS) {
|
if (status != CL_SUCCESS) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user