Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/REFEREE-PAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ manuscript; these are the measurements produced by the autonomous audit
| 1ad | **ZERO IS NOT AN ANNIHILATOR, and no hardware is needed to see it (W976).** The die's failing word decodes exactly against the wrapper's documented layout. Driving the **same generated Verilog** in icarus with the wrapper's own operands: **64 violations in 64 points** — `mac(0, x, 0, y)` returns **`512 + 4x`** instead of 0, in **25 µs** of simulated time | `clause_diagnosis_w976.json`, `tb_zero_comm_w976.v`, derived by `verify_numbers.py` (293 checks) | **the die's contribution was to ask a question nobody had asked** — the defect is in the logic, not the silicon |
| 1ae | **Commutativity fails on the die and is UNEXPLAINED off it (W976).** Three targeted attempts, zero reproductions: a 64-point dense sweep; 32 diverse probes incl. `0x7FFFFFFF`, `0x80000000`, `0xFFFFFFFF`; and **960 per-cycle samples** across 23 operand changes testing the sticky-latch/ready-race mechanism — **0 transients, 0 ready skew** | same | **stated as unexplained deliberately**: three hardware mis-attributions in three waves (Docker, the cable, "no BSCANE2") were each a plausible guess |
| 1af | **The suite covered exactly the clauses that pass (W976).** ZERO and COMM: **untested**. CANCEL and IND: tested, and green on the die. The spec's two tests also assert on **fixed constants** while every die clause drives **live operands** | same | **two independent deficiencies** — fewer properties, and constant inputs; either alone would have hidden a defect that is *linear in the operand* |
| 1ag | **ROOT CAUSE (W977): the MAC re-implements the multiply and drops the zero guard.** `GftSignedMac` is **flat — zero instances** of `GftSmul`/`GftSadd` — and repeats the identical hidden-bit line `prod = __mul_noop((512 + am), (512 + bm))` **without** the zero guards `GftSmul` carries (`if (a==0)` @258, `if (b==0)` @262; the word "zero" does not appear in the MAC) | `root_cause_w977.json`, derived by `verify_numbers.py` (304 checks) | **one missing guard explains both die results**: `smul`'s ZERO clause is **true** on silicon, the MAC's is **false**. Three cheaper hypotheses were tested and refuted first |
| 1ah | **Seven operators to the die (W977): two pass, two fail arithmetic, one fails timing, two never arrive.** `gft_sadd` **1111**, `gft_train1` **1111**; `gft_smul` **1010**, `gft_signed_mac` **0011**; `gft_bitnet_neuron` **FAIL timing 16.63 vs 70.77 MHz**; `gft_xorpercep` and `gft_signed_dot4` **ABSENT** (600 s PnR cap) | same | **every operator passes its own simulation suite**. The `ABSENT`/`FAIL` split matters: one genuine timing miss, not three |
| 2 | **TNF4 is the only sub-8-bit format measured that works under PTQ**: fp4 e2m1 and GF4 lose 70.5 / 71.3 pp | same | GF4 and fp4 are one lattice (identical to the digit on every seed) |
| 2a | **The advantage is a range, not a number.** Without retraining: **13–65 pp**. With max-scale QAT: **+0.19 / +0.89 pp**. With a **learned** scale: **+1.58 / +0.91 pp** — a better recipe *widened* it eightfold on MNIST | `qat_2026-08-20.json`, `lsq_2026-08-20.json` | epoch budgets differ (4 vs 3) across the two QAT runs; paired tests are within-run |
| 2c | **WITHDRAWN and replaced (W945).** The 4-bit comparison was not width-matched: TNF4 is physically **6 bits / 57 grid values**, fp4 e2m1 is 4 bits / 15. Against real 6-bit floats the advantage is **+0.11 (MNIST, t 2.2)** and **+0.17 (Fashion, t 1.2 — not significant)**, and with quantised activations on Fashion **fp6 e3m2 wins by 0.42** | `lsq_width_matched_2026-08-20.json` | four waves of headline numbers were measured against a competitor two bits narrower |
Expand Down
76 changes: 76 additions & 0 deletions research/arxiv_tnf/measurements/root_cause_w977.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"wave": "W977",
"board": "1:5",
"idcode": "0x3636093",
"root_cause": {
"finding": "GftSignedMac is a FLAT module with ZERO instances of GftSmul or GftSadd. It re-implements the multiply inline, using the identical hidden-bit line prod = __mul_noop((512 + am), (512 + bm)) -- and OMITS the zero guards that GftSmul carries (if (a == 0) at line 258, if (b == 0) at line 262).",
"evidence": {
"smul_zero_guards": [
258,
262
],
"mac_zero_guards": [],
"shared_hidden_bit_line": "prod = __mul_noop((512 + am), (512 + bm))",
"smul_line": 333,
"mac_line": 69
},
"consequence": "mac(0,x,0,y) = 512 + 4x. The implicit leading one is added even when the operand is zero, so zero is not an annihilator in the MAC while it IS in smul -- which is exactly what the die reported for both."
},
"validation_of_w976": {
"method": "re-ran the ZERO probe gated on the module's own ready",
"result": "16 violations in 16 points with ready high; result = 512 + 4*live",
"verdict": "W976's 64/64 stands; it was not a sampling artefact",
"note": "GftSmul/GftSignedMac assign ready = 1'b1, so the gate is vacuous here -- but it had to be checked before standing behind the claim"
},
"operators": {
"gft_smul": {
"sim_passed": 3,
"die_word": "0xa5a5332a",
"die_design": 12,
"clauses": {
"c_zero": 1,
"c_comm": 0,
"c_gold": 1,
"c_ind": 0
},
"ok": 0,
"beat": 1,
"note": "ZERO passes -- smul has the guard. COMM and IND fail on the die and were NOT reproduced in simulation across 20 operand pairs."
},
"gft_xorpercep": {
"sim_passed": 1,
"LUT": 10799,
"CARRY4": 1885,
"fmax_mhz": 2.08,
"die": "ABSENT -- nextpnr hit the 600 s cap; never reached hardware"
},
"gft_train1": {
"sim_passed": 3,
"die_word": "0xa5a5317f",
"die_design": 5,
"clauses": "1111",
"ok": 1,
"beat": 1,
"note": "PASS"
},
"gft_bitnet_neuron": {
"sim_passed": 2,
"die": "FAIL timing -- Max frequency for cfgmclk 16.63 MHz, required 70.77 MHz",
"note": "a genuine timing FAIL with rc=1, distinct from the ABSENT of a PnR time cap"
}
},
"refuted_hypotheses": [
"sadd(0,0) != 0 -- false, sadd(0,0) = 0",
"smul(0,x) != 0 -- false, smul(0,12345) = 0",
"smul commutativity broken -- 0 violations in 20 pairs"
],
"table": {
"gft_sadd": "3/3 sim, die 1111 ok=1 PASS",
"gft_train1": "3/3 sim, die 1111 ok=1 PASS",
"gft_smul": "3/3 sim, die 1010 ok=0 FAIL (COMM, IND)",
"gft_signed_mac": "2/2 sim, die 0011 ok=0 FAIL (ZERO, COMM)",
"gft_xorpercep": "1/1 sim, ABSENT -- PnR 600 s cap",
"gft_bitnet_neuron": "2 sim, FAIL timing 16.63 vs 70.77 MHz",
"gft_signed_dot4": "ABSENT -- PnR cap + BSCAN chain/site mismatch"
}
}
21 changes: 21 additions & 0 deletions research/arxiv_tnf/verify_numbers.py
Original file line number Diff line number Diff line change
Expand Up @@ -544,5 +544,26 @@ def drop(d, task, fmt, key="formats", base="baseline"):
check("падающие клаузы не покрыты тестами",
"untested" in cd_["coverage_finding"], True, tol=0)

# W977: root cause of the ZERO defect, and seven operators to the die.
rc_ = rec("root_cause_w977.json")
if rc_:
print("\n== корневая причина и таблица операторов (W977)")
ev = rc_["root_cause"]["evidence"]
check("охранников нуля в GftSmul", len(ev["smul_zero_guards"]), 2, tol=0)
check("охранников нуля в GftSignedMac", len(ev["mac_zero_guards"]), 0, tol=0)
check("общая строка со скрытой единицей",
ev["shared_hidden_bit_line"].startswith("prod = __mul_noop"), True, tol=0)
check("W976 подтверждён стробированием",
"stands" in rc_["validation_of_w976"]["verdict"], True, tol=0)
check("опровергнутых гипотез", len(rc_["refuted_hypotheses"]), 3, tol=0)
ops = rc_["operators"]
check("smul: ZERO держится", ops["gft_smul"]["clauses"]["c_zero"], 1, tol=0)
check("smul: COMM падает", ops["gft_smul"]["clauses"]["c_comm"], 0, tol=0)
check("smul: IND падает", ops["gft_smul"]["clauses"]["c_ind"], 0, tol=0)
check("train1: проходит", ops["gft_train1"]["ok"], 1, tol=0)
check("операторов в таблице", len(rc_["table"]), 7, tol=0)
passes = sum(1 for v in rc_["table"].values() if "PASS" in v)
check("проходят на кристалле", passes, 2, tol=0)

print(f"\n ИТОГ: сошлось {ok}, расхождений {bad}, пропущено блоков {skip}")
sys.exit(1 if bad else 0)
Loading