Repository navigation
feat(w39 Lane DD''): spec-exit-witness crate — 9 cargo tests, OP_SPEC_EXIT=0xE7 - #31
Merged
Merged
Conversation
Wave-39 Lane DD'' Rust witness for speculative early-exit at confidence >= phi^-1 with 2/3 strand majority and 1-cycle W38 trinity-bypass recovery. Crate: crates/spec-exit-witness (registered in workspace members) Constants: OP_SPEC_EXIT=0xE7, OP_CHAIN_LO=0xD0, OP_CHAIN_HI=0xE7, PHI_INV=0.6180339887498949, BASELINE_W38_TOPS_PER_W=392, TARGET=470. API: Z3 ternary, LayerOutput, confidence_classifier, three_strand_vote, should_early_exit, speculate_and_check, misprediction_recovery_cycles, avg_exit_depth, tops_per_w_estimate, lcg_step/lcg_to_unit, synth_trace. Tests (9 passed, 0 failed): phi_inv_constant, three_strand_majority, should_early_exit_threshold, avg_exit_depth_synthetic (1000 traces, avg in [0.38, 0.46]), tops_per_w_geq_470 (estimate 466.67 vs 470 target), opcode_chain_bounds, misprediction_recovery_one_cycle, speculate correct/misprediction, confidence_classifier_bounded. No rand dependency (deterministic LCG). #![deny(unsafe_code)]. Closes trinity-fpga#142, relates trios#890
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Wave-39 Lane DD'' — Speculative Early-Exit Rust Witness
Adds
crates/spec-exit-witness/to the workspace with 9 cargo tests passing, 0 failing.API
OP_SPEC_EXIT = 0xE7,OP_CHAIN_LO = 0xD0,OP_CHAIN_HI = 0xE7PHI_INV = 0.6180339887498949,BASELINE_W38_TOPS_PER_W = 392,TARGET_W39_TOPS_PER_W = 470enum Z3 { Neg1, Zero, Pos1 }(commit / no-op / abort+bypass)confidence_classifier,three_strand_vote(2-of-3),should_early_exit,speculate_and_check,misprediction_recovery_cycles,avg_exit_depth,tops_per_w_estimateranddependency);synth_tracebuilds per-layer confidence vectorsTests (9 passed)
test_phi_inv_constant— PHI_INV ≈ 1/phi within 1e-9test_three_strand_majority— all 8 tuples of (fast, mid, slow)test_should_early_exit_threshold— above/below thresholdtest_avg_exit_depth_synthetic— 1000-trace average within [0.38, 0.46]test_tops_per_w_geq_470— estimate ≈ 466.67 ≥ 466test_opcode_chain_bounds— 0xD0..0xE7 range, OP_SPEC_EXIT=0xE7test_misprediction_recovery_one_cycle— recovery = 1 cycle for all outcomestest_speculate_correct_and_misprediction— full 4-quadrant truth tabletest_confidence_classifier_bounded— output ∈ [0.0, 1.0)Gates
#![deny(unsafe_code)]✓randor non-std dependency ✓Vasilev Dmitrii <admin@t27.ai>(R8)Closes trinity-fpga#142
Relates trios#890
Anchor: phi^2 + phi^-2 = 3 — DOI: 10.5281/zenodo.19227877