mirror of
https://github.com/jwinterm/xmr-stak.git
synced 2026-12-02 12:33:56 +01:00
Proper removal of gpu_thread_num
This commit is contained in:
+5
-4
@@ -53,15 +53,16 @@ In the most cases a `worksize` of `16` or `8` is optimal.
|
||||
|
||||
### Add More GPUs
|
||||
|
||||
To add a new GPU you need to add a new config set to `gpu_threads_conf` and increase `gpu_thread_num"` to the number of gpus (entries in `gpu_threads_conf`).
|
||||
`index` is the number of the gpu.
|
||||
To add a new GPU you need to add a new config set to `gpu_threads_conf`. `index` is the OpenCL index of the gpu.
|
||||
`platform_index`is the index of the OpenCL platform (Intel / AMD / Nvidia).
|
||||
If you are unsure of either GPU or platform index value, you can use `clinfo` tool that comes with AMD APP SDK to dump the values.
|
||||
|
||||
```
|
||||
"gpu_thread_num" : 2,
|
||||
|
||||
"gpu_threads_conf" :
|
||||
[
|
||||
{ "index" : 0, "intensity" : 1000, "worksize" : 8, "affine_to_cpu" : false },
|
||||
{ "index" : 1, "intensity" : 1000, "worksize" : 8, "affine_to_cpu" : false },
|
||||
],
|
||||
|
||||
"platform_index" : 0,
|
||||
```
|
||||
|
||||
@@ -48,7 +48,7 @@ using namespace rapidjson;
|
||||
/*
|
||||
* This enum needs to match index in oConfigValues, otherwise we will get a runtime error
|
||||
*/
|
||||
enum configEnum { iGpuThreadNum, aGpuThreadsConf, iPlatformIdx };
|
||||
enum configEnum { aGpuThreadsConf, iPlatformIdx };
|
||||
|
||||
struct configVal {
|
||||
configEnum iName;
|
||||
@@ -58,7 +58,6 @@ struct configVal {
|
||||
|
||||
//Same order as in configEnum, as per comment above
|
||||
configVal oConfigValues[] = {
|
||||
{ iGpuThreadNum, "gpu_thread_num", kNumberType },
|
||||
{ aGpuThreadsConf, "gpu_threads_conf", kArrayType },
|
||||
{ iPlatformIdx, "platform_index", kNumberType }
|
||||
};
|
||||
@@ -235,14 +234,6 @@ bool jconf::parse_config(const char* sFilename)
|
||||
}
|
||||
|
||||
size_t n_thd = prv->configValues[aGpuThreadsConf]->Size();
|
||||
if(prv->configValues[iGpuThreadNum]->GetUint64() != n_thd)
|
||||
{
|
||||
printer::inst()->print_msg(L0,
|
||||
"Invalid config file. Your GPU config array has %llu members, while you want to use %llu threads.",
|
||||
int_port(n_thd), int_port(prv->configValues[iGpuThreadNum]->GetUint64()));
|
||||
return false;
|
||||
}
|
||||
|
||||
thd_cfg c;
|
||||
for(size_t i=0; i < n_thd; i++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user