Commit Graph
164 Commits
Author SHA1 Message Date
rob thijssen 2d8945ee34 Use ubuntu-latest runner for CI workflow instead of self-hosted 2025-09-17 00:01:48 +08:00
rob thijssen 84f2156c39 change trigger branches from 'cuda' to 'main' 2025-09-16 23:56:19 +08:00
rob thijssen 9f14ebd121 Merge pull request #4 from Quantus-Network/cuda
cuda mining engine
2025-09-16 23:53:16 +08:00
rob thijssen 3730f79094 Add stable config for NVIDIA RTX 5090 CUDA miner 2025-09-16 23:48:23 +08:00
rob thijssen b4e9bf0c42 Add FoundOrigin enum to track candidate source in engine results 2025-09-16 23:09:25 +08:00
rob thijssen a0a7712493 Add found-origin metrics and logging for CUDA engine candidates
- Track candidate origin (cpu, gpu-g1, gpu-g2) in metrics with counters
and gauges - Log detailed info on candidate discovery per origin in CUDA
engine - Emit per-job found-origin gauge in miner-service with actual
job_id - Cleanup origin metrics on
2025-09-16 22:49:47 +08:00
rob thijssen f3af50acac Update CUDA miner debug environment for RTX 5090 2025-09-16 22:07:03 +08:00
rob thijssen 8c4934b8f6 Enable and configure CUDA miner settings for RTX 5090 debug environment 2025-09-16 22:03:41 +08:00
rob thijssen a824148b68 Lower CUDA log level from debug to trace for finer-grained output 2025-09-16 21:47:44 +08:00
rob thijssen cdf197cd15 Add extensive debug and info logging to CUDA engine initialization and
kernel launches

Include detailed logs for device info, context creation, buffer
allocations, kernel resolution and launch parameters, and data transfers
to help diagnose CUDA behavior and failures. Also add fallback and error
logging enhancements.
2025-09-16 21:02:32 +08:00
rob thijssen 8f051f543c Add build.rs to embed version with git SHA in miner-cli binary 2025-09-16 12:24:24 +08:00
rob thijssen fbd63b580f revert all --version semver changes 2025-09-15 09:38:50 +08:00
rob thijssen e899709f72 Revert "Add build script to append git SHA to version info"
This reverts commit 7674e3141f.
2025-09-15 09:29:11 +08:00
rob thijssen 7674e3141f Add build script to append git SHA to version info 2025-09-15 09:14:40 +08:00
rob thijssen 5867ddefe9 append short git sha to the semantic version returned by the cli when
invoked with `--version`
2025-09-15 09:01:27 +08:00
rob thijssen b108ccefbe simplify sha3 digest handling in qpow kernel
add optional cuda sampler parity logging for debugging false positives
2025-09-15 08:44:34 +08:00
rob thijssen 2480d7828b Cache CUDA context and module in CudaEngine for reuse
Initialize CUDA context and load module once per engine instance,
storing them in a mutex-protected cache to avoid repeated setups. Use
cached context/module for kernel launches, creating a fresh stream each
call. Adjust grid dimension calculation to consider multiprocessor
count.
2025-09-14 18:49:19 +03:00
rob thijssen 7e6eee8c72 Add watchdog logging and improve result channel handling in miner
service
2025-09-14 18:33:50 +03:00
rob thijssen 6ca3d236ab Increase CUDA threads to 7168 and disable host verification 2025-09-14 18:04:45 +03:00
rob thijssen 0c3617c9e1 Adjust MINER_CUDA_VERIFY to 2048 in debug config 2025-09-14 17:44:21 +03:00
rob thijssen 2c7709413b Use Rust 1.58+ format strings in miner logs and remove unused binding 2025-09-14 17:35:23 +03:00
rob thijssen 4ba983a4c0 Add job ID to miner thread logs for better traceability 2025-09-14 17:05:14 +03:00
rob thijssen 2596e62003 Limit counted CUDA attempts to covered nonces for accuracy 2025-09-14 16:03:34 +03:00
rob thijssen 1a2d5e459d Update CUDA miner example profiles to use auto-tuned G2 kernel settings
Refactor all NVIDIA GPU profiles for mixed-load (lower) and dedicated
(upper) configurations. Enable auto-tuning of per-batch iterations (do
not set desired iters). Adjust thread/block counts, iteration budgets,
and enable/disable sampling and verification to balance responsiveness
and overhead for each profile. Add usage tips and logging level
guidance.
2025-09-14 16:00:19 +03:00
rob thijssen 0d81f3a346 Autotune CUDA desired_iters and improve logging
Add dynamic tuning of desired_iters based on coverage and thread count.
Enhance info logs with attempts and utilization metrics. Update example
config.
2025-09-14 15:43:36 +03:00
rob thijssen f37e70e1b1 Fix nonce advancement logic and update CUDA miner env settings 2025-09-14 15:31:46 +03:00
rob thijssen 737de2113a Add debug option to force GPU winner for early exit
Introduce C_DEBUG_FORCE_WIN device constant to force a winner on GPU at
tid=0,j=0. Enable control via MINER_CUDA_FORCE_WIN environment variable
in Rust to trigger early exit and aid debugging.
2025-09-14 15:06:22 +03:00
rob thijssen 456742e425 fix kernel indexing and use correct digest bytes in qpow CUDA kernel
enable sampler in miner config and increase verify iterations to 2048
2025-09-14 14:47:44 +03:00
rob thijssen 05217dc516 Add MINER_CUDA_VERIFY to cuda-miner debug env file 2025-09-14 14:34:47 +03:00
rob thijssen c3fa990402 optional host-side verification for CUDA G2 batches
support for verifying first W candidates on the host when
MINER_CUDA_VERIFY is set, logging any missed winners.

add a metric for missed winners and info logging for found flags.
2025-09-14 14:29:28 +03:00
rob thijssen e9eada661d mark job result as served and track serving metrics in miner service
keep completed jobs with served results for cleanup and log serving
info. add metric increments for result readiness and serving events.
re-verify nonce distance before serving and update job state
accordingly.
2025-09-14 14:05:26 +03:00
rob thijssen 6d9e5ab89b Add engine health dashboard for Grafana monitoring 2025-09-14 13:29:36 +03:00
rob thijssen d6f98398ed Update Grafana engines comparison dashboard JSON formatting and widgets 2025-09-14 13:16:00 +03:00
rob thijssen 531eb7df99 refine mining metrics to reduce redundancy and improve cleanup
remove redundant estimated rate gauges and ensure all related job and
thread metrics are cleaned up on job cancellation and completion.

update GPU CUDA metrics to use backend-specific estimated rate.
2025-09-14 13:08:42 +03:00
rob thijssen c385f25af8 add set_job_estimated_rate_backend function to metrics crate 2025-09-14 12:54:01 +03:00
rob thijssen 80f3bb3eae Add janitor thread to prune stale job and thread metrics 2025-09-14 12:50:58 +03:00
rob thijssen ca9f97a265 adjust active thread count based on desired iterations in CUDA kernel
launch
2025-09-14 12:18:43 +03:00
rob thijssen d2842cf7ed refactor CUDA G2 batching to allocate inputs and outputs per batch 2025-09-14 11:58:40 +03:00
rob thijssen 8399bd6f7d early-exit detection and per-batch base nonce logic to CUDA miner
early-exit checks for found solutions within each batch by copying and
validating device results. Rebuild per-batch base nonces and initial
states for kernel launches using effective iters instead of
iters_per_thread. Log false positives with debug info for easier
diagnosis.
2025-09-14 11:22:44 +03:00
rob thijssen 3fa3b60b20 Disable CUDA sampler in 3060 debug example env file 2025-09-14 10:56:43 +03:00
rob thijssen 0d3d3c50e3 Reduce CUDA threads and increase batches in miner config 2025-09-14 10:54:47 +03:00
rob thijssen 06629e85b7 Add MINER_CUDA_BATCHES to cuda-miner-3060-debug env file 2025-09-14 10:42:41 +03:00
rob thijssen e57e91bec9 Refactor CUDA engine bounds calculation for clarity 2025-09-14 10:38:53 +03:00
rob thijssen 8288d21423 CUDA kernel batching and estimated attempt rate metrics
Support multiple batches per launch controlled by MINER_CUDA_BATCHES.
Report estimated device attempt rate (nonces/sec) to metrics per batch.
2025-09-14 10:35:51 +03:00
rob thijssen b58e54eacd Fix nonce coverage calculation to use actual covered count 2025-09-14 10:11:52 +03:00
rob thijssen 4c5fe8b36d Adjust CUDA iterations per thread based on remaining nonce range
Calculate effective iterations to avoid exceeding coverage and update
all relevant uses from configured iterations to this dynamic value.
2025-09-14 09:57:44 +03:00
rob thijssen 928f2fe4c2 Add detailed debug logs for CUDA G1 and G2 coverage prefixes 2025-09-14 09:42:15 +03:00
rob thijssen ce749eebc3 Add RUST_LOG settings to cuda-miner debug environment file 2025-09-14 09:22:09 +03:00
rob thijssen b0eedef3e5 Improve full-precision bound checks for CUDA G2 coverage and hashing 2025-09-14 09:11:55 +03:00
rob thijssen 05bb5d885f Increase CUDA kernel ABI version and add coverage bounds check
Limit per-thread iterations to prevent hashing beyond assigned coverage
range in the kernel and update kernel launch parameters accordingly.
2025-09-14 08:28:10 +03:00