Compute Unit Identification

How to use Crossbelt to return a list of compute unit ids.

Compute Unit Ids

This feature was inspired by getting my vegas up and running on xubuntu 18 where you need to bring your own toolchain to manage GPUs. One of the annoying parts of not using a mining distro is starting a miner. While crossbelt does not control miners yet, it can help provide valuable information so you can start them yourself.

Starting a miner with selection of compute units

As an example here we want to start the cast_xmr-vega160 miner.

/usr/bin/cast_xmr-vega160 -R --noichash -S ${pool1} -u "${addr}.${minername}" -p x -a 10 -G 0,1,2,3 --intensity=10

But notice the -G 0,1,2,3 option here. We are statically assigning fixed gpu numbers here. Imagine if just one of these compute units fail after a reboot. Your script which demands all 4 GPUs will fail to start, because the wrong ids were passed to the miner.

Determining the compute unit ids dynamically

But with crossbelt we can just query the system and return the gpu ids of all the compute units or even a subselection based on filters.

/usr/bin/cast_xmr-vega -R --noichash -S ${pool1} -u "${addr}.${minername}" -p x -a 10 -G $(cb cu id) --intensity=10

Crossbelt with cb cu id would return 0,1,2,3 or with a filter. cb cu id -g /vega 56/ would return 0,1

The filter can be a regular expression, range or list of ids.

  • 1,2,3,4
  • 1-4,7,6
  • 1,6,0
  • /570/
  • /570|580/