Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/CUDApp/blob/main/evidence/FLASH-NEXT-CONTROL-FIX-20261118/README.md # CUDApp CUDA++: AIEN’s GPU machine-code toolchain, runtime and driver client for NVIDIA GPUs without the CUDA toolkit. Hardware coverage and driver replacement limits are explicit. Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `CUDApp / evidence / FLASH-NEXT-CONTROL-FIX-20261118 / README.md` 86 lines · 5778 bytes Raw Blame History Source # Why the flipped-bit control of rowrans missed 104 matrices, and a control that does not Date 2026-11-18. Base commit `559e3a448c8489cf62b8484e9ed230abcbbb89a7`. Machine: DGX Spark host CPU (aarch64), gcc 13.3.0, `nice -n 19`, `taskset -c 10` / `-c 12` under `omega-pool-10` / `omega-pool-12` locks. No GPU opened. Chip status: NOT_RUN. The historical tool and run (`../FLASH-NEXT-WEIGHT-WASTE-20261118/`, the fullcover JSONL) are not changed. Checkpoint: local `Qwen3.8-Flash-Next-FP8` revision `7fb48d708ca6cd8eeed8f4db0433be18af96984f`. Tensors are read by byte range into one file in `/dev/shm` and removed; no weights are committed. Each result row carries the tensor's SHA-256. ## The defect `rowrans.c` (SHA-256 `777d3612...`, built binary `7623006d...`, same as the fullcover binary) flips bit `0x10` of stream byte `w/2` and calls the flip detected only if the decoded bytes differ. Its decoder never checks the rANS end conditions. A flip in the last byte or two of a row changes the low bits of the state after the last symbol that depends on them, so every decoded byte is still right and only the final state is wrong. The old control reports that as a miss although the stream is corrupt and is detectable. The fullcover run (131 shards, 75264 expert matrices, concatenated JSONL SHA-256 `aa396fb8d38449e0ccf444e28a7ba37482d9c87628e685073dbad34a2c5db66b`) had `flip_detected 0` in 104 matrices and `roundtrip 0` in none. ## The repaired measurement `rowrans_strict.c` (SHA-256 `6333e925929fe7722574dd51127ac8cb78d0b2a5ad5e9cbaf0fae23ce271c8cb`) keeps the encoder byte for byte (same coded size on every matrix below) and decodes each row with the same arithmetic, recording: decoded bytes changed; first state outside `[2^23, 2^31)` (`init_bad`); a renormalisation byte wanted after the row's end (`starved`); unread bytes at the end (`leftover`); final state not `2^23` (`term_bad`). Class: - `decoded_bytes_changed`: some decoded byte differs. - `decoded_equal_end_state_invalid`: bytes equal, an end condition fails (noncanonical terminal state or stream length). - `equivalent_encoding`: bytes equal and every end condition holds on a stream that differs from the encoder's. Why `equivalent_encoding` should be empty: with the first state in `[2^23, 2^31)`, each decode step and each byte read is the exact inverse of an encoder step, so a stream that decodes to the input, reads every byte and ends in state `2^23` is the encoder's own stream. The runs below check this; they do not replace a proof. ``` gcc -O2 -Wall -Wextra -Werror -o rowrans_strict rowrans_strict.c gcc -O2 -Wall -Wextra -Werror -o rowrans_hist ../FLASH-NEXT-WEIGHT-WASTE-20261118/rowrans.c # sha256 7623006d... ``` ## Results - `failed-control.raw` (layer 0, expert 335, `up_proj`, 640 x 2560, SHA-256 `27a23135...`; `failed-control-and-mutant.log`): historical binary prints `1638400 1349463 1` with and without `flip`. Strict: flip at stream byte 673195 = byte 2100 of row 319, whose stream is 2101 bytes (the last byte). Decoded bytes equal, `term_bad=1`, final state `8388624` = 2^23 + 16 (the flipped bit), class `decoded_equal_end_state_invalid`, `strict_detected=1`. Clean stream: `strict_ok=1`. - All 104 historical misses plus 104 clean controls (`exercise.py`, `results-midpoint.jsonl` SHA-256 `e3a2286591fab9d610d74eaf80ab75ec4d6e5e9520d66ce09618ad8274a01a31`, `summary.log`, 21.5 s): ``` python3 -I exercise.py FULLCOVER_OUT MODEL_DIR rowrans_hist rowrans_strict results-midpoint.jsonl python3 -I summarize.py results-midpoint.jsonl # exit 0 ``` - Historical verdict reproduced on all 208 (coded size, round trip, flip verdict); `inconsistencies 0`. - Misses: 104 of 104 `decoded_equal_end_state_invalid`, all `term_bad`, 35 also `starved`, none `init_bad` or `leftover`. Flip position: 103 in the last byte of a row, 1 in the second to last. - Controls (next matrix in the same shard with a detected historical flip): 104 of 104 `decoded_bytes_changed`. - Every clean stream (208) passes the strict check: no false alarm. Every flip (208) is strictly detected. - `equivalent_encoding`: 0. - Every single-bit flip of every stream byte, two matrices (`rowrans_strict ... all`): Matrix flips missed by old check missed by strict check equivalent encoding old misses by bytes from row end (1,2,3,4,5) L0 e335 up 640x2560 (`exhaustive-layer0-e335-up.out`, 2:49.82) `10771128` 5414 0 0 4408, 876, 119, 11, 0 L0 e484 down 2560x640 (`exhaustive-layer0-e484-down.out`, 46.17 s, tensor `2dcf037c...`) `10889728` 21601 0 0 17720, 3481, 375, 24, 1 Every old miss is `term_bad`; none is `init_bad` or `leftover`. Rates (`rates.log`, Python `Fraction`): 5414/`10771128` = 0.000503, 21601/`10889728` = 0.00198; midpoint misses 104/75264 = 0.00138. - Mutation (`failed-control-and-mutant.log`): replacing `q.term_bad = x != RL;` with `q.term_bad = 0;` makes the strict tool report the failed control as `strict_detected=0 class=equivalent_encoding`. The terminal-state check is what catches these flips. ## What this does and does not show - The 104 misses were a defect of the control, not silent changes to decoded weights: in all 104 the decoded bytes equal the original, and the end-state check flags the corruption. - Covered: single-bit flips in the row streams. Not covered here: flips in the frequency table or row offsets, truncation, multi-bit errors. A strict end-state check makes a single-bit stream error detectable; it is not an integrity guarantee against arbitrary corruption. A checksum per row or per matrix is still needed for that. - Host instrument only. No runtime decoder exists; chip status NOT_RUN.