mirror of
https://github.com/GOSTSec/sgminer
synced 2025-01-31 08:54:19 +00:00
only change gpu engine, memclock, fans, if ADL is enabled
This commit is contained in:
parent
dfaee21023
commit
87bbca6148
@ -295,10 +295,12 @@ char *set_gpu_engine(const char *_arg)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
char *set_gpu_fan(char *arg)
|
char *set_gpu_fan(const char *_arg)
|
||||||
{
|
{
|
||||||
int i, val1 = 0, val2 = 0, device = 0;
|
int i, val1 = 0, val2 = 0, device = 0;
|
||||||
char *nextptr;
|
char *nextptr;
|
||||||
|
char *arg = (char *)alloca(strlen(_arg) + 1);
|
||||||
|
strcpy(arg, _arg);
|
||||||
|
|
||||||
nextptr = strtok(arg, ",");
|
nextptr = strtok(arg, ",");
|
||||||
if (nextptr == NULL)
|
if (nextptr == NULL)
|
||||||
|
@ -9,7 +9,7 @@ extern void *reinit_gpu(void *userdata);
|
|||||||
extern char *set_gpu_map(char *arg);
|
extern char *set_gpu_map(char *arg);
|
||||||
extern char *set_gpu_threads(const char *arg);
|
extern char *set_gpu_threads(const char *arg);
|
||||||
extern char *set_gpu_engine(const char *arg);
|
extern char *set_gpu_engine(const char *arg);
|
||||||
extern char *set_gpu_fan(char *arg);
|
extern char *set_gpu_fan(const char *arg);
|
||||||
extern char *set_gpu_memclock(const char *arg);
|
extern char *set_gpu_memclock(const char *arg);
|
||||||
extern char *set_gpu_memdiff(char *arg);
|
extern char *set_gpu_memdiff(char *arg);
|
||||||
extern char *set_gpu_powertune(char *arg);
|
extern char *set_gpu_powertune(char *arg);
|
||||||
|
@ -6241,6 +6241,7 @@ static void get_work_prepare_thread(struct thr_info *mythr, struct work *work)
|
|||||||
set_rawintensity(work->pool->rawintensity);
|
set_rawintensity(work->pool->rawintensity);
|
||||||
if (work->pool->thread_concurrency)
|
if (work->pool->thread_concurrency)
|
||||||
set_thread_concurrency(work->pool->thread_concurrency);
|
set_thread_concurrency(work->pool->thread_concurrency);
|
||||||
|
#ifdef HAVE_ADL
|
||||||
if (work->pool->gpu_engine) {
|
if (work->pool->gpu_engine) {
|
||||||
set_gpu_engine(work->pool->gpu_engine);
|
set_gpu_engine(work->pool->gpu_engine);
|
||||||
for (i = 0; i < nDevs; i++)
|
for (i = 0; i < nDevs; i++)
|
||||||
@ -6257,6 +6258,7 @@ static void get_work_prepare_thread(struct thr_info *mythr, struct work *work)
|
|||||||
if (gpus[i].min_fan == gpus[i].gpu_fan)
|
if (gpus[i].min_fan == gpus[i].gpu_fan)
|
||||||
set_fanspeed(i, gpus[i].gpu_fan);
|
set_fanspeed(i, gpus[i].gpu_fan);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
// Change algorithm for each thread (thread_prepare calls initCl)
|
// Change algorithm for each thread (thread_prepare calls initCl)
|
||||||
for (i = 0; i < mining_threads; i++) {
|
for (i = 0; i < mining_threads; i++) {
|
||||||
struct thr_info *thr = mining_thr[i];
|
struct thr_info *thr = mining_thr[i];
|
||||||
|
Loading…
x
Reference in New Issue
Block a user