Skip to content

Commit

Permalink
Update the 1.9.5 Client + add AMD cards support
Browse files Browse the repository at this point in the history
  • Loading branch information
Worm committed Apr 22, 2024
1 parent bb6e64e commit fadc759
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 36 deletions.
13 changes: 8 additions & 5 deletions RAVINOS/manifest.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
{
"package":"qubminer-1.9.0",
"package":"qubminer-1.9.5",
"name": "qubminer",
"version": "1.9.0",
"description": "Qubminer 1.9.0",
"version": "1.9.5",
"description": "Qubminer 1.9.5",
"maintainer":"Worm ([email protected])",
"platforms": ["nvidia"],
"platforms": [
"amd",
"nvidia"
],
"dual_coin": false,
"algo": ["qubic"],
"executable": ["qli-Client"],
"rev": 1
"rev": 9
}
40 changes: 19 additions & 21 deletions RAVINOS/start.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,33 +22,34 @@ def process_user_config(custom_user_config, settings):
param_high = param.upper()
modified_param = param_high
modified_param = modified_param.replace('PAYOUTID', 'payoutId')
modified_param = modified_param.replace('AMOUNTOFTHREADS', 'amountOfThreads')
modified_param = modified_param.replace('ACCESSTOKEN', 'accessToken')
modified_param = modified_param.replace('ALLOWHWINFOCOLLECT', 'allowHwInfoCollect')
modified_param = modified_param.replace('HUGEPAGES', 'hugePages')
modified_param = modified_param.replace('CPUONLY', 'cpuOnly')
modified_param = modified_param.replace('ALIAS', 'alias')
modified_param = modified_param.replace('OVERWRITES', 'overwrites')
modified_param = modified_param.replace('TRAINER', 'trainer')
if param != modified_param:
param = modified_param
if value:
if param == 'overwrites':
value = value.replace("{", "").replace("}", "")
if param == 'trainer':
value = value.replace("{", "").replace("}", "").replace(" ", "")
pairs = value.split(',')

if 'overwrites' in settings:
overwrites_data = settings['overwrites']
if 'trainer' in settings:
trainer_data = settings['trainer']
else:
overwrites_data = {}
trainer_data = {}

for pair in pairs:
param_2, value_2 = pair.split(':')
if value_2 == 'false':
overwrites_data[param_2] = False
trainer_data[param_2] = False
elif value_2 == 'true':
trainer_data[param_2] = True
elif re.match(r'^[0-9]+(\.[0-9]+)?$', value_2):
trainer_data[param_2] = int(value_2)
else:
overwrites_data[param_2] = value_2
trainer_data[param_2] = value_2

settings['overwrites'] = overwrites_data
settings['trainer'] = trainer_data
else:
if value == 'null':
settings[param] = None
Expand Down Expand Up @@ -122,25 +123,22 @@ def check_and_run(miner_dir, log_file, hugePages):
hugePages = global_settings.get('hugePages')

# Additional check in the Settings for only CPU mining
if global_settings.get('cpuOnly') != 'yes':
if global_settings.get('trainer', {}).get('gpu'):
settings_gpu = global_settings.copy()
settings_gpu['alias'] += '-gpu'
settings_gpu['amountOfThreads'] = 0
settings_gpu.pop('hugePages', None)
settings_gpu.setdefault('trainer', {}).update({'cpu': False})
settings_gpu.setdefault('trainer', {}).update({'gpu': True})
with open("{}/gpu/appsettings.json".format(miner_dir), 'w') as f:
json.dump({'Settings': settings_gpu}, f)

# Additional check and modification in the Settings for CPU mining
if global_settings.get('cpuOnly') == 'yes' or global_settings.get('amountOfThreads') != 0:
if global_settings.get('trainer', {}).get('cpuThreads') and global_settings.get('trainer', {}).get('cpuThreads') != 0:
settings_cpu = global_settings.copy()
settings_cpu['alias'] += '-cpu'
settings_cpu['allowHwInfoCollect'] = False
settings_cpu.pop('cpuOnly', None)
settings_cpu.pop('hugePages', None)
if 'overwrites' in settings_cpu:
overwrites = settings_cpu['overwrites']
if 'CUDA' in overwrites:
overwrites.pop('CUDA', None)
settings_cpu.setdefault('trainer', {}).update({'cpu': True})
settings_cpu.setdefault('trainer', {}).update({'gpu': False})
with open("{}/cpu/appsettings.json".format(miner_dir), 'w') as f:
json.dump({'Settings': settings_cpu}, f)

Expand Down
73 changes: 66 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,25 @@ Qubminer are now successfully integrated into RaveOS.
- Higher RAM frequencies improves CPU it/s
- Do not overload your CPUs with threads, instead, aim to find the sweetpoint

*Only NVIDIA GPU compatible*
<br>

> [!NOTE]
> The defualt configuration is vor NVIDIA. To enable AMD GPU you need to add `"trainer":{"gpuVersion":"AMD"}` to Extra config arguments.
> [!IMPORTANT]
> AMD Version is currently only allowed in `qubic.li CPU/GPU Mining (Fixed Reward 85%)`

## Configuration
The startup script takes values from the flight sheet to complete the default configuration (`appsettings_global.json`).

There are a lot of necessary libraries for work into syslib folder

Each time the miner starts, the `appsettings.json` file is recreated

> [!IMPORTANT]
> For CPU you have to define which Version should be used. The `cpuVersion` propery can be used. Please refer to https://github.com/qubic-li/client/?tab=readme-ov-file#qli-trainer-options for a list of available versions. You can also find there all other available options.
### The main settings:
![Flight Sheet](/img/FlightSheet.png)

Expand All @@ -42,7 +51,13 @@ Each time the miner starts, the `appsettings.json` file is recreated
Extra config arguments exemple:
```
"accessToken":"YOUROWNTOKEN"
"amountOfThreads":4
"trainer":{"cpuThreads":4}
```

**Sample Configuration for AMD GPU's + CPU dual mining**
```
"accessToken":"YOUROWNTOKEN"
"trainer":{"gpuVersion":"AMD","cpuThreads":4}
```

### GPU mining:
Expand All @@ -51,16 +66,22 @@ Extra config arguments exemple:
Extra config arguments exemple:
```
"accessToken":"YOUROWNTOKEN"
"trainer":{"cpu":"false"}
```

**Sample Configuration for AMD GPU's**
```
"accessToken":"YOUROWNTOKEN"
"trainer":{"cpu":"false","gpuVersion":"AMD"}
```

### CPU mining:
![Flight Sheet CPU](/img/FlightSheetCPU.png)
<br>
Extra config arguments exemple:
```
"cpuOnly":"yes"
"amountOfThreads":24
"accessToken":"YOUROWNTOKEN"
"trainer":{"cpu":"true","gpu":"false","cpuThreads":4}
```

### Recommended RaveOS GPU overclocks :
Expand All @@ -81,7 +102,45 @@ Please use "Tunning Settings" from workers's dashboard to set global or specific
| ---- |----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| ```"accessToken":``` | This is you personal JWT Token which you can obtain from the Control Panel at qubic.li |
| ```"payoutId":``` | This is the ID you want to get token payout for your found solutions. |
| ```"hugePages":nnnn``` | Depending on your environment you might want to enable huge pages. This can increase your iterations per second. The trainer will tell you what is the optimal setting when it detects a wrong value. The number depends on the number of threads: nb_threads * 52 (e.g., 16 * 52 = 832). If trainer is unstable please remove. |
| ```"overwrites": {"AVX512": false}``` | Disable AVX512 and enforce AVX2 (AVX Intel CPU not working) |
| ```"overwrites": {"SKYLAKE": true}``` | Enforce SKYLAKE (AVX Intel CPU not working) |
| ```"hugePages":nnnn``` | Depending on your environment you might want to enable huge pages. This can increase your iterations per second. The trainer will tell you what is the optimal setting when it detects a wrong value. The number depends on the number of threads: nb_threads * 52 (e.g., 16 * 52 = 832). If trainer is unstable please remove.|
| ```"trainer": {}``` | The trainer configuration options |

<br>

### Trainer Options

```json
{
"cpu":false,
"cpuVersion":"AVX512",
"cpuThreads":16,
"cpuAffinity":"",
"cpuVariant":"",
"gpu":true,
"gpuVersion":"CUDA12",
"gpuCards":"",
"gpuVariant":""
}
```

| Setting | Default Value | Description |
|--- |--- |--- |
| *cpu | false | Enable CPU Training |
| *gpu | false | Enable GPU Training |
| cpuVersion | "GENERIC" | CPU Version to be used [QLI Trainer Options](#qli-trainer-options) |
| gpuVersion | null | GPU Version to be used [QLI Trainer Options](#qli-trainer-options) |
| cpuThreads | 1 | Number of Threads used for CPU training |
| gpuCards | null | Which GPU Cards should be used (see details below; available from client `>=1.9.5` and runner `>=105.3`) |
| cpuAffinity | null | CPU Affinity for CPU training |
| cpuVariant | null | Which Variant of CPU trainer should be used |
| gpuVariant | null | Which Variant of GPU trainer should be used |

> [!NOTE]
> The `gpuCards` property can be used to select `gThreads`. The default configuration is `auto tune` for all cards.<br>
> For each GPU you can use (comma separated):<br>
> `-1` => auto tune<br>
> `0` => disable GPU<br>
> `>0` => number of `gThreads` to be used<br>
> >e.g.: `0,-1,-1,-1,-1,-1` => GPU#1 disabled, #1-5 auto tuen<br>
> e.g.: `0` => GPU#0 disabled, if there are more, all will be auto tuned<br>
> e.g.: `512,256,256,256,256,512` => set `gThread` to 512 on GPU#0 and GPU#5, 256 to the rest<br>
4 changes: 1 addition & 3 deletions appsettings_global.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
{
"Settings": {
"baseUrl": "https://mine.qubic.li/",
"amountOfThreads": 0,
"payoutId": null,
"accessToken": null,
"alias": "qubic.li Client",
"allowHwInfoCollect": true,
"overwrites": {"CUDA": "12"}
"trainer": {"gpu": true, "gpuVersion": "CUDA12"}
}
}
Binary file modified qli-Client
Binary file not shown.

0 comments on commit fadc759

Please sign in to comment.