You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Replace the count-gated, per-job-reset hashrate with a free-running nonce
accumulator sampled over a wall-clock window (EWMA-smoothed) -- the model used
by ethminer/XMRig. Fixes the dashboard reporting 0 H/s for slow / memory-hard
kernels (XelisHash V3, Octopus, large-DAG) under fast pool job streams, where
kernelExecuted was zeroed on every mining.notify before it could reach the
100-launch publish threshold. The displayed value is also smoother than before.
- Statistical: nonceAccumulator (std::atomic<uint64_t>, relaxed) counts the
actual per-launch nonces, correct across occupancy changes; the mining thread
fetch_adds and the stats thread exchange()s it to 0, so the two threads never
race. sampleWindow() folds one sample into the EWMA per window: a working
window contributes its measured rate, an empty/stalled window contributes
0 H/s so the value decays toward 0 instead of holding a stale rate (a hung GPU
stays visible). A slow but working kernel still completes >= 1 launch per
window, so it never produces an empty window and never decays. Pure
computeHashrate/smoothHashrate helpers.
- Device: getHashrate() is a pure const read; new sampleHashrate() (stats thread)
owns the window; updateBatchNonce() no longer resets the window per job;
loopDoWork() opens the first window before the loop; updateJob() skips the
redundant pre-rebuild reset when memory is being rebuilt.
- Stats thread samples via sampleHashrate(); REST API and benchmark unchanged.
- --internal_kernel_count no longer gates the display (kept for compatibility).
- Unit tests for the meter (sources/statistical/tests).
Copy file name to clipboardExpand all lines: documentation/ARCHITECTURE.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -458,7 +458,7 @@ Loaded from CLI by `common::Cli`, supports per-device pool overrides:
458
458
459
459
**Statistics** (`statistical/statistical.hpp`):
460
460
- Tracks kernel executions, valid/invalid shares, elapsed time
461
-
-`getHashrate()` computes MH/s from kernel count × batch nonce / time
461
+
-`sampleHashrate()`(stats thread) computes H/s from accumulated nonces over a wall-clock window, EWMA-smoothed; `getHashrate()` is a pure read of the last sample
462
462
- Printed to console every ~10 seconds by the stats thread
Copy file name to clipboardExpand all lines: documentation/PARAMETERS.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -97,7 +97,7 @@ N/A : No default value is set.
97
97
|`--blocks`| ✅ | N/A | Set occupancy blocks. |`--blocks=128`|
98
98
|`--occupancy`| ✅ | false | System will define the best occupancy for kernel. |`--occupancy=<true\|false>`|
99
99
|`--internal_loop`| ✅ | 1 | Set internal loop for kernel. |`--internal_loop=1`|
100
-
|`--internal_kernel_count`| ✅ | 1 |Set internal loop for kernel. This defines the minimum number of times the kernel must be called to display statistics|`--internal_kernel_count=1`|
100
+
|`--internal_kernel_count`| ✅ | 1 |Deprecated: no longer affects the hashrate display (the dashboard now uses a time-windowed meter). Still accepted for backwards compatibility.|`--internal_kernel_count=1`|
101
101
|`--cuda_context`| ✅ | auto | Set CUDA context. |`--cuda_context=<auto\|blocking\|yield\|spin>`|
0 commit comments