Browse Source

Allow a fixed speed difference between memory and GPU clock speed that will change memory speed when GPU speed is changed in autotune mode.

nfactor-troky
Con Kolivas 13 years ago
parent
commit
8c63061eaa
  1. 6
      adl.c
  2. 32
      main.c
  3. 1
      miner.h

6
adl.c

@ -808,9 +808,11 @@ void gpu_autotune(int gpu, bool *enable) @@ -808,9 +808,11 @@ void gpu_autotune(int gpu, bool *enable)
{
int temp, fanpercent, engine, newpercent, newengine;
bool fan_optimal = true;
struct cgpu_info *cgpu;
struct gpu_adl *ga;
ga = &gpus[gpu].adl;
cgpu = &gpus[gpu];
ga = &cgpu->adl;
lock_adl();
temp = __gpu_temp(ga);
@ -880,6 +882,8 @@ void gpu_autotune(int gpu, bool *enable) @@ -880,6 +882,8 @@ void gpu_autotune(int gpu, bool *enable)
newengine /= 100;
applog(LOG_INFO, "Setting GPU %d engine clock to %d", gpu, newengine);
set_engineclock(gpu, newengine);
if (cgpu->gpu_memdiff)
set_memoryclock(gpu, newengine + cgpu->gpu_memdiff);
}
}
ga->lasttemp = temp;

32
main.c

@ -1237,6 +1237,35 @@ static char *set_gpu_memclock(char *arg) @@ -1237,6 +1237,35 @@ static char *set_gpu_memclock(char *arg)
return NULL;
}
static char *set_gpu_memdiff(char *arg)
{
int i, val = 0, device = 0;
char *nextptr;
nextptr = strtok(arg, ",");
if (nextptr == NULL)
return "Invalid parameters for set gpu memdiff";
val = atoi(nextptr);
if (val < -9999 || val > 9999)
return "Invalid value passed to set_gpu_memdiff";
gpus[device++].gpu_memdiff = val;
while ((nextptr = strtok(NULL, ",")) != NULL) {
val = atoi(nextptr);
if (val < -9999 || val > 9999)
return "Invalid value passed to set_gpu_memdiff";
gpus[device++].gpu_memdiff = val;
}
if (device == 1) {
for (i = device; i < MAX_GPUDEVICES; i++)
gpus[i].gpu_memdiff = gpus[0].gpu_memdiff;
}
return NULL;
}
static char *set_gpu_powertune(char *arg)
{
int i, val = 0, device = 0;
@ -1525,6 +1554,9 @@ static struct opt_table opt_config_table[] = { @@ -1525,6 +1554,9 @@ static struct opt_table opt_config_table[] = {
OPT_WITH_ARG("--gpu-memclock",
set_gpu_memclock, NULL, NULL,
"Set the GPU memory (over)clock in Mhz - one value for all or separate by commas for per card"),
OPT_WITH_ARG("--gpu-memdiff",
set_gpu_memdiff, NULL, NULL,
"Set a fixed difference in clock speed between the GPU and memory in auto-gpu mode"),
OPT_WITH_ARG("--gpu-powertune",
set_gpu_powertune, NULL, NULL,
"Set the GPU powertune percentage - one value for all or separate by commas for per card"),

1
miner.h

@ -218,6 +218,7 @@ struct cgpu_info { @@ -218,6 +218,7 @@ struct cgpu_info {
int gpu_fan;
int min_fan;
int gpu_memclock;
int gpu_memdiff;
int gpu_powertune;
float gpu_vddc;
#endif

Loading…
Cancel
Save