bittensor.utils.register_cuda#
Functions#
Logs any CUDA errors. |
|
Resets the CUDA environment. |
|
|
Solves the PoW problem using CUDA. |
Module Contents#
- bittensor.utils.register_cuda.reset_cuda()#
Resets the CUDA environment.
- bittensor.utils.register_cuda.solve_cuda(nonce_start, update_interval, tpb, block_and_hotkey_hash_bytes, difficulty, limit, dev_id=0)#
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]])