bittensor
bittensor copied to clipboard
[Feature] [cubit] CUDA registration solver
This PR adds a CUDA solver for the registration POW.
- Requires: cubit
- see requirements for cubit
- installed as extra
pip install -e .[cubit] - will throw error if the user doesn't have a CUDA device and/or cubit
New Flags
--cuda (default: False)to use CUDA registration (if available)--cuda.dev_id <int> (default: 0)--cuda.TPB <int, 128, 256, 512> (default: 256)- the number of threads per block in the CUDA kernel
- should be left at default or raised to 512
- may crash the registration process if too high
- power of 2 only
- the number of threads per block in the CUDA kernel
--cuda.update_interval <int> (default: 50_000)- the number of nonces to solve between chain updates
- can be raised or lowered.
- having a higher value may mean less-frequent chain updates which may lead to trying to submit a solution outside of the valid solve window for that block (not efficient)
- can be raised or lowered.
- the number of nonces to solve between chain updates
Pull Request Test Coverage Report for Build 9887610a-0822-4309-8bb1-f5943016608e
- 55 of 298 (18.46%) changed or added relevant lines in 4 files are covered.
- 698 unchanged lines in 22 files lost coverage.
- Overall coverage decreased (-16.5%) to 65.303%
| Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
|---|---|---|---|
| bittensor/_subtensor/subtensor_impl.py | 1 | 8 | 12.5% |
| bittensor/utils/register_cuda.py | 8 | 43 | 18.6% |
| bittensor/utils/init.py | 41 | 242 | 16.94% |
| <!-- | Total: | 55 | 298 |
| Files with Coverage Reduction | New Missed Lines | % |
|---|---|---|
| bittensor/_dataset/thread_queue.py | 1 | 97.14% |
| bittensor/_keyfile/init.py | 1 | 90.91% |
| bittensor/_metagraph/init.py | 1 | 79.49% |
| bittensor/_tokenizer/init.py | 1 | 68.29% |
| bittensor/_wallet/wallet_mock.py | 1 | 72.97% |
| bittensor/utils/balance.py | 2 | 66.67% |
| bittensor/_dataset/dataset_impl.py | 4 | 89.44% |
| bittensor/_subtensor/init.py | 4 | 78.16% |
| bittensor/_subtensor/subtensor_mock.py | 4 | 85.9% |
| bittensor/_config/init.py | 8 | 70.97% |
| <!-- | Total: | 698 |
| Totals | |
|---|---|
| Change from base Build 4e1e1b4f-b1e3-466c-8141-fd4e3f9265c2: | -16.5% |
| Covered Lines: | 3529 |
| Relevant Lines: | 5404 |
💛 - Coveralls
Tested this and overall looks good! But looks like when running using btcli run it won't use cuda to register, so these flags don't quite apply there correct?
Tested this and overall looks good! But looks like when running using btcli run it won't use cuda to register, so these flags don't quite apply there correct?
I'll have to add those flags.