Browse Source

Allow writing of multiple worksizes to the configuration file.

nfactor-troky
ckolivas 13 years ago
parent
commit
d3ad87f5d2
  1. 4
      cgminer.c
  2. 1
      ocl.c

4
cgminer.c

@ -2308,6 +2308,10 @@ void write_config(FILE *fcfg)
for(i = 0; i < nDevs; i++) for(i = 0; i < nDevs; i++)
fprintf(fcfg, "%s%d", i > 0 ? "," : "", fprintf(fcfg, "%s%d", i > 0 ? "," : "",
gpus[i].vwidth); gpus[i].vwidth);
fputs("\",\n\"worksize\" : \"", fcfg);
for(i = 0; i < nDevs; i++)
fprintf(fcfg, "%s%d", i > 0 ? "," : "",
(int)gpus[i].work_size);
#ifdef HAVE_ADL #ifdef HAVE_ADL
fputs("\",\n\"gpu-engine\" : \"", fcfg); fputs("\",\n\"gpu-engine\" : \"", fcfg);
for(i = 0; i < nDevs; i++) for(i = 0; i < nDevs; i++)

1
ocl.c

@ -356,6 +356,7 @@ _clState *initCl(unsigned int gpu, char *name, size_t nameSize)
clState->wsize = 64; clState->wsize = 64;
else else
clState->wsize = (clState->max_work_size <= 256 ? clState->max_work_size : 256) / clState->vwidth; clState->wsize = (clState->max_work_size <= 256 ? clState->max_work_size : 256) / clState->vwidth;
gpus[gpu].work_size = clState->wsize;
/* Create binary filename based on parameters passed to opencl /* Create binary filename based on parameters passed to opencl
* compiler to ensure we only load a binary that matches what would * compiler to ensure we only load a binary that matches what would

Loading…
Cancel
Save