bittensor.utils.register_cuda#
Functions#
| 
 | Solves the PoW problem using CUDA. | 
| Resets the CUDA environment. | |
| Logs any CUDA errors. | 
Module Contents#
- bittensor.utils.register_cuda.solve_cuda(nonce_start, update_interval, tpb, block_and_hotkey_hash_bytes, difficulty, limit, dev_id=0)[source]#
- Solves the PoW problem using CUDA. - Parameters:
- nonce_start (numpy.int64) – Starting nonce. 
- update_interval (numpy.int64) – Number of nonces to solve before updating block information. 
- tpb (int) – Threads per block. 
- block_and_hotkey_hash_bytes (bytes) – Keccak(Bytes of the block hash + bytes of the hotkey) 64 bytes. 
- difficulty (int) – Difficulty of the PoW problem. 
- limit (int) – Upper limit of the nonce. 
- dev_id (int) – The CUDA device ID. Defaults to - 0.
 
- Returns:
- Tuple of the nonce and the seal corresponding to the solution. Returns -1 for nonce if no solution is found. 
- Return type:
- (Union[tuple[Any, bytes], tuple[int, bytes], tuple[Any, None]])