|
@@ -304,6 +304,7 @@ void opencl_early_init()
|
|
|
struct opencl_device_data * const data = &dataarray[i];
|
|
struct opencl_device_data * const data = &dataarray[i];
|
|
|
*data = (struct opencl_device_data){
|
|
*data = (struct opencl_device_data){
|
|
|
.dynamic = true,
|
|
.dynamic = true,
|
|
|
|
|
+ .use_goffset = BTS_UNKNOWN,
|
|
|
.intensity = intensity_not_set,
|
|
.intensity = intensity_not_set,
|
|
|
#ifdef USE_SCRYPT
|
|
#ifdef USE_SCRYPT
|
|
|
.lookup_gap = 2,
|
|
.lookup_gap = 2,
|
|
@@ -451,6 +452,19 @@ const char *opencl_init_binary(struct cgpu_info * const proc, const char * const
|
|
|
return NULL;
|
|
return NULL;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+static
|
|
|
|
|
+const char *opencl_init_goffset(struct cgpu_info * const proc, const char * const optname, const char * const newvalue, char * const replybuf, enum bfg_set_device_replytype * const out_success)
|
|
|
|
|
+{
|
|
|
|
|
+ struct opencl_device_data * const data = proc->device_data;
|
|
|
|
|
+ char *end;
|
|
|
|
|
+ bool nv = bfg_strtobool(newvalue, &end, 0);
|
|
|
|
|
+ if (newvalue[0] && !end[0])
|
|
|
|
|
+ data->use_goffset = nv;
|
|
|
|
|
+ else
|
|
|
|
|
+ return "Invalid boolean value";
|
|
|
|
|
+ return NULL;
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
#ifdef HAVE_ADL
|
|
#ifdef HAVE_ADL
|
|
|
/* This function allows us to map an adl device to an opencl device for when
|
|
/* This function allows us to map an adl device to an opencl device for when
|
|
|
* simple enumeration has failed to match them. */
|
|
* simple enumeration has failed to match them. */
|
|
@@ -1888,6 +1902,7 @@ static const struct bfg_set_device_definition opencl_set_device_funcs_probe[] =
|
|
|
{"vector", opencl_init_vector},
|
|
{"vector", opencl_init_vector},
|
|
|
{"work_size", opencl_init_worksize},
|
|
{"work_size", opencl_init_worksize},
|
|
|
{"binary", opencl_init_binary},
|
|
{"binary", opencl_init_binary},
|
|
|
|
|
+ {"goffset", opencl_init_goffset},
|
|
|
#ifdef HAVE_ADL
|
|
#ifdef HAVE_ADL
|
|
|
{"adl_mapping", opencl_init_gpu_map},
|
|
{"adl_mapping", opencl_init_gpu_map},
|
|
|
{"clock", opencl_init_gpu_engine},
|
|
{"clock", opencl_init_gpu_engine},
|
|
@@ -1913,6 +1928,7 @@ static const struct bfg_set_device_definition opencl_set_device_funcs[] = {
|
|
|
{"vector", opencl_cannot_set, ""},
|
|
{"vector", opencl_cannot_set, ""},
|
|
|
{"work_size", opencl_cannot_set, ""},
|
|
{"work_size", opencl_cannot_set, ""},
|
|
|
{"binary", opencl_cannot_set, ""},
|
|
{"binary", opencl_cannot_set, ""},
|
|
|
|
|
+ {"goffset", opencl_cannot_set, ""},
|
|
|
#ifdef HAVE_ADL
|
|
#ifdef HAVE_ADL
|
|
|
{"adl_mapping", opencl_cannot_set, "Map to ADL device"},
|
|
{"adl_mapping", opencl_cannot_set, "Map to ADL device"},
|
|
|
{"clock", opencl_set_gpu_engine, "GPU engine clock"},
|
|
{"clock", opencl_set_gpu_engine, "GPU engine clock"},
|