Skip to content

kernel contract: the CUDA runner maps fp8_experts' image, so a run reaches its summary - #1579

Merged
ashhart merged 2 commits into
ashhart:mainfrom
Bizuayeu:pr/contract-fp8-image
Oct 29, 2026
Merged

ashhart merged 2 commits into
ashhart:mainfrom
Bizuayeu:pr/contract-fp8-image

Conversation

@Bizuayeu

@Bizuayeu Bizuayeu commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

What this changes

What it buys: the CUDA kernel contract runs to the end again. On main, zig build kernel-contract on a CUDA
machine stops at fp8_experts' first record about 90 minutes in (5,428 s on a GB10), with 270 of its 1,325
live-limit checks made and no SUMMARY line. The other 1,055 never run, and a pull request that changes a CUDA kernel
cannot show the SUMMARY line its checklist asks for. With this change the same run makes all 1,325 checks and ends
in its SUMMARY. Only the contract's runner and a host test change, so prompt and decode speed and the served bytes
cannot move.

455448d26 registered launch records for fp8_experts' three prompt kernels (registry_media.zig), but image() in
zig/tests/cuda/contract_limits.zig, which the live limits use to load each record's image, does not know the name.
The live limits then print FAIL kernel-contract: unknown image name: fp8_experts and the run stops with
UnknownContractImage, before the records after it and before its SUMMARY line. CI builds the runner
(compile-cuda-tests) but does not run it.

  • image() now maps fp8_experts to kernels.fp8_experts, on a line of its own beside window_rows, so it leaves
    alone the list of names that kernel pull requests append to (ten open ones change that line).
  • contract_images_test.zig gains "every registered CUDA launch and control selects its own image": every record in
    registry.all_cuda and registry.cuda_controls must resolve to its own inert bytes. It fails on main naming
    fp8_experts, and would name the next image registered without a mapping. Of the registry's image names, fp8_experts
    is the only CUDA one the map lacks (the others are HIP's).

Receipt

  • Environment: TensorFold f56838b3c (main 7c0688951 and this commit); GB10 (sm_121); nvcc 13.0.88; zig build kernel-contract -Dnvcc=... -Dsm=80,86,89,120,121.
  • Before: on main the new test fails with unknown image name: fp8_experts. On the GB10, a run of a branch on this
    main stopped there in the live limits after 5,428 s (kernel-contract: UnknownContractImage), with no SUMMARY.
  • After: the run on the GB10 reaches every registered launch and its summary, in 5,336 s with the build. The three
    fp8_experts launches pass the live limits as recorded (gate-up 218 registers, down f32 and down bf16 221, 32,768
    shared bytes each), and SUMMARY 433 kernels: 433 pass gates 1-4, 0 fail, 6 known findings; 316 controls: 316 red as planted, 0 missed; 183 limit problems. The run still exits 1 on those 183, none of them fp8_experts' and none
    touched here: 168 records with no compiled usage for nvcc 13.0 (Qwen4's hc, ple, projection and gdn images, Qwen3.5's
    attention, nvfp4_experts_tile's two tile kernels), and 15 live launches of nvfp4_experts_tile and Qwen3.5 whose usage
    is missing from or differs from their records.
  • Exactness, decode and prompt speed: n/a, the contract's runner and a host test only; no engine code changes.
  • Tests run (Linux x86_64): test-contract-images-host 6/6 (5/6 on main, the new test failing), zig build test
    436/439 steps (5,424 of 5,451 tests, 26 skipped; the one failure Qwen3.5's timing-dependent cost-identity test,
    which fails the same way on main), compile-cuda-tests 10/10 steps, zig fmt --check, and
    tools/zig/lean_check.py with nothing new (425 against main's 425).
  • Not run, and why: Metal and HIP (these files are CUDA's contract).

Checklist

  • Every token still goes through the lane rounds. No serial path, and nothing that needs drafts off. (No engine
    code changes.)
  • Drafted output equals "draft": false, a resumed prompt equals a fresh one, and concurrent equals solo. (No
    engine code changes.)
  • No precision traded for speed. If the bits change, the description says which sums change and why. (No
    arithmetic changes.)
  • A new or changed GPU kernel is registered with the kernel contract (docs/kernel-contract.md); each backend's
    SUMMARY line is in the receipt. (No kernel changes; the CUDA SUMMARY line is in the receipt.)
  • Prompt processing is no slower than the last release. (No engine code changes.)
  • The description says which platforms I ran, Metal M1 to M5 and CUDA, and which I could not.
  • New tests fail before the change, pass after it, and skip cleanly without their dependency. (The new test fails
    on main naming fp8_experts and passes with the map's line; it needs no device.)
  • Comments and docstrings are one line. No measurements or history in the source.
  • No personal data, machine names, internal hosts or local paths. No AI attribution lines.

Bizuayeu and others added 2 commits October 29, 2026 23:39
…aches its summary

455448d registered fp8_experts' three prompt kernels, but contract_limits.zig's image() does not know the name: on a
CUDA machine `kernel-contract` stops in the live limits with UnknownContractImage, before every record after it and
before its SUMMARY line. A host test now resolves every registered CUDA launch and control, and fails on main naming
fp8_experts.
@ashhart
ashhart force-pushed the pr/contract-fp8-image branch from f56838b to 0d9312b Compare October 29, 2026 23:39
@ashhart
ashhart merged commit bf9d68a into ashhart:main Oct 29, 2026
9 checks passed
@ashhart

ashhart commented Oct 31, 2026

Copy link
Copy Markdown
Owner

Thank you @Bizuayeu. This is in TensorFold 1.2.0, released today: https://github.com/ashhart/TensorFold/releases/tag/v1.2.0

It landed with your commits under your own name, so you're listed as a TensorFold contributor, and it's credited to you in the release notes and the changelog.

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.

2 participants