10gic / vanitygen-plusplus

A vanity address generator for BTC, ETH, LTC, TRX and 100+ more crypto currencies.
GNU Affero General Public License v3.0
248 stars 90 forks source link

Feature request: Support multiple GPUs (parallel GPU computation) #95

Closed ottok closed 2 months ago

ottok commented 9 months ago

This is a very cool tool, thanks for creating it!

While running it I noticed it only uses a single CPU. It would be cool if it supported running on multiple GPUs in parallel.

image

ottok commented 9 months ago

I just tested https://github.com/1inch/profanity2 and it seems to run on all available GPUs by default. Perhaps you can take a peek at their implementation as reference.

image

10gic commented 9 months ago

In multi-GPU scenarios, please specify the -D parameter.

ottok commented 9 months ago

In multi-GPU scenarios, please specify the -D parameter.

I did and I can use it to select which GPU device to use (e.g. -D 0 or -D 1) but I did not find any way to tell it to use more than one GPU. Can you please share what syntax can achieve that?

10gic commented 9 months ago

Usage:

$ ./oclvanitygen++
......
-D <devstr>   Use OpenCL device, identified by device string
              Form: <platform>:<devicenumber>[,<options>]
              Example: 0:0,grid=1024x1024
......
10gic commented 9 months ago

-D parameter comes from the original vanitygen project. I don’t have a multi-GPU device at hand. Try specifying the -D parameter multiple times.

ottok commented 9 months ago

-D parameter comes from the original vanitygen project. I don’t have a multi-GPU device at hand. Try specifying the -D parameter multiple times.

I tried. It will only use one device in all scenarios I tested, and if I do -D 0 -D 1 it picks ends up running only on device '1'.

10gic commented 9 months ago

Usage:

-D <devstr>   Use OpenCL device, identified by device string
              Form: <platform>:<devicenumber>[,<options>]
              Example: 0:0,grid=1024x1024

For example, try ./oclvanitygen++ -v -D 0:0 -D 0:1 -D 0:2 1ove