Repository navigation
Add a GB10 latency kit to compare fixed stalls with NAK - #254
Draft
aien-spark wants to merge 9 commits into
Draft
aien-spark wants to merge 9 commits into
aien-spark wants to merge 9 commits into
Conversation
Dependent-chain kernels, a NAK diff, and a Spark runner that holds flock /tmp/aien-gb10.lock only around the launch (timeout 600). Measured cells stay empty until that run; the host self-test does not invent them. Co-authored-by: aien-spark <aien@aienos.com>
The fixed-latency chains read a destination armed to a sentinel the producer does not read, so a stale value fails the oracle. Stall-1 SASS is checked for that pair with no scoreboard and no yield. Cycle medians at stall 1 are recorded even when every stall matches. GB10 open still depends on the 0xa04 admission; this does not add it. Co-authored-by: aien-spark <aien@aienos.com>
sm121dis of the overhead kernel showed IADD of the counter with stall 1 (control 0x000fc200) immediately before ISETP, and @!P0 BRA back to the body. The compare then samples the previous counter, so the stored trip count misses the overhead check and every exact oracle fails through stall 15. HMMA has no loop. On the predicate chain, stall 1 leaves the previous true P0 for @p0 BRA, so the poison move exits on the first pass and the clocks cover that exit. The host simulator hides GPR writes for 5 cycles and predicate writes for 14. Overhead must store the trip count, the top of the sweep must match the fresh oracle, stall 1 must match the stale oracle, and putting stall 1 back on the increment must fail the counter check. Co-authored-by: aien-spark <aien@aienos.com>
Each lane stores the two clocks, four result words, and its lane id. HMMA's four words are FADD of d0..d3 against zero, compared with the host dot of sixteen bf16 ones, not with the stall-36 launch. The host simulator requires the same match on all 32 lanes. This has not been launched. Co-authored-by: aien-spark <aien@aienos.com>
raw.json now has the four oracle words, lanes_matched_min, a lane fail mask, and the first mismatching run, lane, and word. run_spark.sh writes RECEIPT.txt and no longer prints a 90 s bound beside the binary's 71 s. Co-authored-by: aien-spark <aien@aienos.com>
word_mismatch_max counts lanes that miss words 2..5. The receipt uses PCI 10de:2e12 when proc Model is Unknown, which is the doctor's GB10 row. Co-authored-by: aien-spark <aien@aienos.com>
| } | ||
| char path[512]; | ||
| snprintf(path, sizeof path, "%s/%s_%u.bin", dir, safe, t.stall); | ||
| FILE *f = fopen(path, "rb"); |
Contributor
Author
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.
Purpose and scope
Host-built latency kit for fixed stalls on the GB10. Kernels are CUDA++ machine code. The headline chip receipt is
evidence/LATMEAS-GB10-20261101-oracle/. Itssm121_vs_NAK.mdis the tablefill_template.pywrote from that directory'sraw.json.Depends on draft PR #251 to open the device. Both chip receipts are local merges of this branch with #251
6a93cb5. That admission is not copied here.Headline receipt
fb91560=7ec0184merged with #251, clean worktree.RECEIPT.txt: 2026-11-01T18:47:06Z, Linux 7.0.0-1019-nvidia, gcc 13.3.0, open module 580.173.02, device000f:01:00.0.raw.jsonsha256aa3fe3fee12ffe123f572e5a0c9b26b7e7fc82142635ea59442b6a008033534amatches the receipt. Launch rc 0, error empty, 1408 launches, 11 runs.At each of those stalls and above:
lanes_matched_min32,lane_fail_mask0x00000000,first_mismatchnull. One stall below: 0 lanes, mask0xffffffff,first_mismatchrun 0 lane 0 word 2.lanes_matched_mincounts a lane only when words 2..5 all equaloracle(tests/gpu_latmeas_test.clanes_report, lines 1537-1547). HMMA's oracle is four copies of1098907648, so 32 at stall 20 meansd0..d3matched on every lane. Everyfirst_mismatchin this file is word 2, because that field keeps the first difference. It does not say whether words 3..5 also differed on the failing stalls. The host self-test plants a word-4-only miss on lane 7 (lines 1648-1650) and requires the reporter to name it. That is a host test, not a chip row.word_mismatch_maxis added after this receipt and is not in thisraw.json.RECEIPT.txtsaysmodel: Unknown. That is the procModelline. The doctor inrun.lognames the same deviceNVIDIA GB10 (sm_121)from PCI0x2e12. The committed receipt is the file the script wrote. A laterrun_spark.shfills the GB10 name from that PCI id when procModelisUnknown.The printed bound is 71 s: 1408 launches times 50 ms, rounded up (
print_plan, lines 1269-1272), an allowance for a cold shader invalidate. The line says the window is usually shorter. The operator reported about one second. The log has no elapsed-time field.Earlier receipts, not the headline:
evidence/LATMEAS-GB10-20261101/(lane 0 only,03cdcc5) andevidence/LATMEAS-GB10-20261101-allanes/(c94c2c9, same stalls,raw.jsonhas no oracle or lane fields).UNITS.mdin the first directory is the NAK delay comparison.Command
On the Spark, with #251 applied, from this head (the per-word counts and the PCI model line are not yet on a chip):
Build and
make doctorstay outside the lock. Only the launch is insideflock /tmp/aien-gb10.lock, wrapped intimeout 600. The binary prints the bound: 1408 launches, 71 s upper bound.Evidence on this commit
0c81899is not the commit that was launched. The launch isfb91560.make test-gpu-latmeasPASS on the host, including the planted word-4 miss andrun_spark.sh --receipt-self-test.make test— NOT RUN here. CIhost-testswas still running on7ec0184when this was written.make test-native-artifact— host-gatesfresh-checkoutpassed on7ec0184.make zero-cuda-gate— same, passed on7ec0184. Not re-run locally on0c81899.build/hello_gpu --sim—hello-simpassed on7ec0184.make doctor— host-gates expects NOT READY on the runner.fresh-checkoutpassed on7ec0184.fb91560,evidence/LATMEAS-GB10-20261101-oracle/. Not a receipt for0c81899.CodeQL on
7ec0184failed: six alerts intests/gpu_latmeas_test.c(world-writablefopen, and a manifest path and allocation size).0c81899opens those outputs with mode 0644 and rejects a manifest id that is not a token, and it caps the read atCODE_CAP. That is not a CodeQL result until the new run finishes.host-tests,x86-host-tests, andnative-x86-hostwere still in progress on7ec0184. This push starts them over.What merge still needs
GitHub ruleset
main-verified-promotiononly blocks deletingmainand non-fast-forward pushes. It does not require status checks (docs/CI_ACCEPTANCE.md).docs/review/CODEOWNERS.proposedis inactive until it is copied to.github/CODEOWNERS.docs/REVIEWING.mdsection 1 still applies: this PR is a draft; evidence has to be for the exact head that is reviewed; host gates are re-run from a fresh clone of that head; someone other than the author approves; merge withgh pr merge --match-head-commit <sha>; nobody merges their own PR. Host results are not hardware qualification.#251 is also a draft. Its last CI run was green and
mergeStateStatuswas CLEAN, with no review. It touchesnvrm/, which the proposed owners file would assign to GPU-core reviewers after activation. Until then the same section 1 rules apply. #254 does not open a GB10 without #251.