Chia-Network / bladebit

A high-performance k32-only, Chia (XCH) plotter supporting in-RAM and disk-based plotting
Apache License 2.0
339 stars 109 forks source link

How to set cuda device in alpha4 harvester? #324

Closed liyujcx closed 1 year ago

liyujcx commented 1 year ago

i use the latest alpha4 harvester on windows 10, 3070 8gb gpu device, but i don't know how to config cuda device .

image

liyujcx commented 1 year ago

is there some guideline to use it...

wallentx commented 1 year ago

You need to update your config.yaml to include the latest changes under the harvester: section:

  # Compressed harvesting.
  parallel_decompressers_count: 1
  # If set to 0, `decompresser_thread_count` will default to half of nproc available on the machine.
  # A non-zero number overrides this default.
  decompresser_thread_count: 0
  disable_cpu_affinity: False
  # Ignore compressed plots with compression level greater than this.
  max_compression_level_allowed: 7
  use_gpu_harvesting: False
  gpu_index: 0
  enforce_gpu_index: False

You'd want to set useuse_gpu_harvesting: True, and enforce_gpu_index: True. The gpu_index setting will dictate which GPU is used. You can determine the GPU index by running: nvidia-smi --query-gpu=index,name --format=csv which should return info such as this:

index, name
0, NVIDIA RTX A4000
1, NVIDIA GTX 1080

I'd use 1 if I wanted to harvest using my GTX 1080, for example.

RnMss commented 1 year ago

Which branch or tag of chia-blockchain are you using? I couldn't find a 1.8.1rc2-dev34.

liyujcx commented 1 year ago

thanks