madMAx43v3r / chia-gigahorse

220 stars 32 forks source link

Specify GPU for farming and plotting #103

Open darkenbula opened 1 year ago

darkenbula commented 1 year ago

I'm using Gigahorse in windows

Installed GPU's 3060ti 8GB - plotting Quadro M2000

Is there anyway to specify which GPU the farmer uses for lookups? Watching task manager and the Quadro appears to be sitting idle the whole time.

I have tried setting GPU affinity in windows display settings but doesnt seem to make a difference

madMAx43v3r commented 1 year ago

https://github.com/madMAx43v3r/chia-gigahorse/blob/master/chiapos/README.md

darkenbula commented 1 year ago

Hi Max, i'm unclear on how to run the export command in windows t

madMAx43v3r commented 1 year ago

https://phoenixnap.com/kb/windows-set-environment-variable#ftoc-heading-4

Zealot88 commented 1 month ago

@madMAx43v3r I'm trying to plot and harvest on the same PC (Ubu22.04), I have a 4070 Super and a P4, I'm plotting C31 plots and I wanted to do both plotting and harvesting on it. Independently of how I export the MAX gpu or GPU visible I always end up with both GPUs being used for harvesting, eventually halting the plotting process due to out of memory error. When I restrict export CHIAPOS_MAX_GPU_DEVICES=1 GPU and export CUDA_VISIBLE_DEVICES=0 the cuda_plot_k32 process fails as there are no GPUs available.

If I change it to export CUDA_VISIBLE_DEVICES=0,1, the harvester will use both GPUs (and I get the out of memory error on cuda_plot).

What am I doing wrong? Using 2.3.0_GH3.0. Thanks

madMAx43v3r commented 1 month ago

you probably forgot to restart chia daemon after exporting, do it via chia stop all -d

need to set CHIAPOS_MAX_GPU_DEVICES=1 yes, and select via order in CUDA_VISIBLE_DEVICES

Zealot88 commented 1 month ago

Thanks @madMAx43v3r forgot to mention that restarted with chia stop all -d. Noticed that that actually just restarted all processes, i.e. no change. Had a chia service running from the standard chia client (joined the GH community on Sunday). Stopped all processes with chia stop farmer and killed the service/daemon. export CUDA_VISIBLE_DEVICES=1 export CHIAPOS_MAX_GPU_DEVICES=1 chia start farmer

worked like a charm. thanks for the great work @madMAx43v3r , GH is so much easier to work with, cheers.