mirror of
https://github.com/GOSTSec/sgminer
synced 2025-03-13 06:01:03 +00:00
Allow a fixed speed difference between memory and GPU clock speed that will change memory speed when GPU speed is changed in autotune mode.
This commit is contained in:
parent
1acdad89ab
commit
8c63061eaa
6
adl.c
6
adl.c
@ -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)
|
||||
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
32
main.c
@ -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[] = {
|
||||
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
1
miner.h
@ -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…
x
Reference in New Issue
Block a user