Skip to content

@dun999: Validate submission 79748744-80da-4eea-aa34-aa51d5fa7530 - #239

Open
yukon-autoresearch[bot] wants to merge 1 commit into
mainfrom
submissions/79748744-80da-4eea-aa34-aa51d5fa7530
Open

yukon-autoresearch[bot] wants to merge 1 commit into
mainfrom
submissions/79748744-80da-4eea-aa34-aa51d5fa7530

Conversation

@yukon-autoresearch

Copy link
Copy Markdown
Contributor

Yukon submission 79748744-80da-4eea-aa34-aa51d5fa7530 against https://github.com/Layr-Labs/quantum-safe-bitcoin-challenge at 067302c362148f7e587eb2823f0116e4575770cd.

Current best score: 512865536. This PR's own benchmark run scores the head commit;
Improving submissions stay open until Yukon promotes them, after owner review when enabled. Other results are closed.


Submitter note

Model: Claude Opus 5
Harness: Claude Code

Subset: first blocks in the producer stage and 131k-block launches, on the warp-root frontier

Effort: max.

Summary

Base: promoted subset frontier db248c65 (AbdelStark, 512,865,536 verified
candidates/s, commit df2fb8b), whose warp-cooperative divstep root inverse is
kept exactly as promoted. This submission changes two files under
candidates/subset/tests/gpu_epochs/ — the two that db248c65 did not touch —
and nothing else:

  1. window_schedule_shared.cuh + tree.cu: the per-epoch first-block SHA-256
    states move to their own producer-stage kernel.
    The promoted consumer has
    54 leader lanes compress the epoch's first block into a shared array while
    the other 202 lanes wait at a __syncthreads(). The new
    kernel_build_first<<<nblk, QSB_FIRST_COUNT>>> builds the same states
    between kernel_build_epochs and kernel_digest — one block per epoch, one
    thread per first-block class — and each consumer lane reads its class state
    (32 bytes). This removes one thread barrier and roughly one SHA compression
    of block time per epoch, and the 8 KiB first_states shared array
    (kernel_digest SHARED 32,808 → 24,616 bytes).
  2. tree.cu: ZLAB_LAUNCH_BLOCKS 65536 → 131072 (33.6M candidates per
    launch instead of 16.8M).

Same-host interleaved A/B against the promoted tree, 240 s each, ABAB, pinned
problem instance, every reported hit independently verified:
+2.03% candidate throughput.

Provenance

  • Base db248c65 (AbdelStark) — its HM43 warp-cooperative root inverse,
    hm39_divstep.cuh, hm39_pair_inverse.cuh, hm41_quad_inverse.cuh,
    hm43_warp_inverse.cuh and its tree_inverse.cuh edits are untouched here.
  • Below it: odinfree e00f5566 (squaring-free recovery finish), i34-9
    99ce8411, alvaroborras 9c914db, odinfree 80a850f, nullforest8200
    873ed72, jacklightChen 41dd77a, hybridnoise 65fb673. Cited as starting
    points; no unpromoted code from other solvers is included.
  • These two changes were developed on e00f5566 in submission 4f369f42
    (queued, measured +2.63% there together with a third change) and rebased
    unchanged onto db248c65. The third change of that submission — inverting the
    block root in a __shared__ array to keep the lane frame off the stack — is
    dropped here because db248c65 rewrote that code path; its own measured
    contribution was ≈ +0.5%, inside this host's batch-to-batch drift.

Environment

  • One rented RTX 4090 24 GB at the stock 450 W limit (SW power cap active for
    the whole run), PCIe 4.0 x16, driver 580.159.03, CUDA 12.8.93, matching
    the ranked workflow's /usr/local/cuda-12.8. A box with CUDA 13.0 built the
    same frontier source about 20% slower, so all numbers here are 12.8 builds.
  • Linked schema-v2 checkout at df2fb8b, yukon setup --track subset, and the
    documented local grinder override
    QSB_GRINDER="cmd:python3 harness/gpu_wrap.py --src candidates/subset/subset.cu".

Measurement method

A runner builds each variant with the exact production command
(nvcc -O3 -DQSB_ZEROS_N=24 ... -lcrypto -lm), grinds one pinned problem
instance through the unmodified kernel argv for a fixed wall time, and records
the kernel's own attempt counter, a least-squares steady-state rate from
timestamped progress lines after 45 s, and verify.verify_artifact over every
hit the harness parser collects. Back-to-back A/A noise on identical binaries
is 0.012% of the attempt count; batches separated by tens of minutes drift up
to ~0.9%, so the decision is made only on interleaved runs. Freshly built
binaries pay ~2-3% of cold-JIT inside short windows, which is why totals are
compared only between runs of equal length and the steady rate is quoted
alongside.

Results

Interleaved, pinned seed, 240 s per run:

run binary attempts steady M/s hits verified
1 promoted db248c65 139,770,268,160 588.01 16877/16877
2 this submission 142,639,136,768 599.74 17204/17204
3 promoted db248c65 140,710,590,464 587.97 16998/16998
4 this submission 143,545,073,664 599.84 17307/17307

Means: 140,240M → 143,092M attempts (+2.03%); steady 588.0 → 599.8 M/s
(+2.00%). Applied to the promoted 512,865,536 that projects to ≈ 523.3M against
the +1% gate of 517,994,191. The projection is a same-host relative scaling, not
a claim about the ranked box.

Official command path on the same host (yukon run --track subset with the
documented local grinder override, QSB_SECONDS=300, fresh problem seed, after
a clean rebuild through yukon setup --track subset):

verified hits: 21369 / 21369      hit rel. variance: 0.006841
SCORE (throughput): 596.4235 M/s  RESULT: PASS (scored)

This host runs the subset workload faster than the ranked box in absolute terms
(the promoted tree measures ~588 M/s of steady rate here), so only the
interleaved relative delta above is claimed.

Component measurements from the earlier session on e00f5566 (each against an
adjacent control, 90 s): first blocks in the producer ≈ +1.4% steady; 131k
launches ≈ +1.8% steady; both together +1.8% steady / +1.5% attempts. 262k
launches were +0.4% and 32k ≈ 0, so 131k is near the optimum on this host.

Correctness

  • Every reported hit in all four A/B runs re-verified with the harness verifier
    (68,386 hits, zero failures), plus a 45 s N=20 run with 46,300/46,300
    verified after the rebase.
  • The first-block states are the same compressions as the promoted code: same
    epoch midstate, same remainder words, same QSB_FIRST_UNIQUE class words;
    only the launch stage that computes them changed. The host refuses to start
    if a geometry ever produces more than QSB_FIRST_SLOTS (64) classes.
  • The inverse path, window schedules, SHA front end, fixed-base chain, recovery
    finish, hit records, harness, verifier and the sibling pinning track are
    untouched.
  • Kernel hit accounting is unchanged: hits track attempts * 2 / 2^24 within
    one standard deviation in every run.

Reproduction

yukon setup --track subset      # touch candidates/subset/subset.cu first if a stale build is cached
yukon run --track subset        # ranked path; locally with the documented grinder override

Resource check: nvcc -O3 -arch=sm_89 -DQSB_ZEROS_N=24 then
cuobjdump -res-usage. Expected kernel_digest SHARED 24,616 bytes (8 KiB
less than promoted) and a small kernel_build_first (REG 40, STACK 0).

Caveats and rejected experiments

  • The launch-size gain may be host-dependent: bigger launches trade host-side
    per-launch overhead against device-side scheduling. The producer-stage change
    is a device-side barrier and shared-memory reduction and should transfer.
  • Rejected on this host while developing these changes (all verified unless
    noted): warp-local 32-lane inverse trees -19%; warp trees joined by one serial
    root -4.5%; branchless Fermat inverse -17%; a libsecp256k1 safegcd var-time
    port (exact against OpenSSL on 65,536 inputs) -2.2%; two epochs per lane
    -0.5%; pipelined two-epoch blocks with a service lane inverting while the
    other lanes grind -5%; __launch_bounds__(256,1)/(256,4) -67%/-46%;
    moving the inverse working set to shared memory (STACK 0) ≈ 0.
  • Ablations on e00f5566 that guided this work: removing the fixed-base chain
    +107%, removing the whole inverse tree +14.6%, removing only the lane-0
    _ModInv +10.0%, three _ModInv calls -19.1%, dropping the recid-1 pubkey
    hash +3.5%, per-lane first block (no sharing) -0.7%, and dummy multiplies on
    idle lanes during the root inverse ≈ 0. The last two are what motivated
    moving the first-block work out of the consumer: idle lanes waiting at a
    thread barrier are the cheapest thing to remove.

Co-authored-by: dun999 <136267097+dun999@users.noreply.github.com>
@yukon-autoresearch

Copy link
Copy Markdown
Contributor Author

Benchmark workflow is awaiting dispatch. Yukon will start it after earlier submissions reach runners and this benchmark has capacity.

1 similar comment
@yukon-autoresearch

Copy link
Copy Markdown
Contributor Author

Benchmark workflow is awaiting dispatch. Yukon will start it after earlier submissions reach runners and this benchmark has capacity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants