Skip to content

residency owners: the recording root exports affine_mm, so test-metal-residency-owners-host compiles again - #2331

Merged
ashhart merged 2 commits into
ashhart:mainfrom
jishnuvenugopal:fix/residency-owners-affine-mm
Nov 7, 2026
Merged

ashhart merged 2 commits into
ashhart:mainfrom
jishnuvenugopal:fix/residency-owners-affine-mm

Conversation

@jishnuvenugopal

@jishnuvenugopal jishnuvenugopal commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Thank you, @ashhart, for settling how #2031 splits, and @garvrao80 for carrying the CI side in #2095, which is what keeps this step on a reviewed list instead of forgotten. Thanks too, @BobClawblaw, for the routed-expert path in 10eb897: it's why the recording root has one more name to export.

What this changes

zig/src/families/qwen27/moe_gpu.zig:6 reads core.affine_mm. In test-metal-residency-owners-host, core is the recording root zig/residency_owner_tests.zig, which zig/build/residency_host.zig hands to the Qwen27 engine modules. That root exports affine4 and affine4_lane but not affine_mm, so the step stops with root source file struct 'residency_owner_tests' has no member named 'affine_mm'. One line adds the export, in the same form as the lines beside it. Only a test root changes.

Verified outcome

  • Why: on main, the check that compares actual allocations with the recorded residency inventory does not compile, so none of its 68 tests run.
  • What was done: the test's stand-in for the shared library now provides the one name the newer expert code asks for.
  • Result: all 68 tests pass again, and every other check I compared gives the same result with and without this change.

Checks on this head

  • Head commit: 238ace8.
  • Lean checker, python3 tools/zig/lean_check.py, then tools/zig/lean_new.py: 425 problems on 3e37f94 and 425 on this commit, 0 new.
main 3e37f94 this commit 238ace8
test-metal-residency-owners-host does not compile: no member named affine_mm 5/5 steps, 68/68 tests passed
test-flashnext-vision-memory-host 16/16 same
test-flashnext-cleanup-host 16/16 same
test-qwen-dense-route-host 1/1 same
zig build test, empty cache on each side 597/711 steps succeeded, 63 failed; 9384/9447 tests passed, 62 skipped, 1 failed same counts
test-golden 5/5 steps same
test-kernel-contract 22/22 steps, 198/198 tests same
fuzz-cortheon 3/3 steps, 20/20 tests same
test-server-security 5/5 steps, 20/20 tests same

zig fmt --check build.zig zig and git diff --check against 3e37f94 are clean on this commit.

  • Cause pinned to one commit: on 10eb897's parent 206e629 the step passes 68/68; at 10eb897 it stops with this compile error.
  • The other three rows share this test root and pass without the change, so this repairs one step, not four.
  • The one failed test in zig build test is the same on main and on this commit: exl3_load's "a scan that fails an allocation frees every group prefix it held", which fails without output. This change does not touch it, and I have not looked into its cause.
  • Of the 63 failed steps inside zig build test, 62 stop because xcrun cannot find metal, and the other is that test. The names match on both sides.
  • CI: all 7 checks passed on this commit. No CI job reaches this step, which is how it went red on main unseen, so this green run cannot show this fix. The local mirror is the table above.
  • Not run: plain zig build, native and dev-tools (no Xcode here, and this file is in none of them), Metal and CUDA devices, Linux hosts, and Windows hosts.

Receipt

n/a: this changes a test root that no shipped binary builds, so it cannot reach inference.

  • Environment: 238ace8 on 3e37f94, Zig 0.17.0, Apple M1 Pro, macOS 26.6. Command Line Tools only. No checkpoint and no GPU run.
  • Paths and platforms the change reaches: the recording test root's host compile. No kernel is new or changed.
  • Licence: n/a. No new weights.

Checklist

  • The title and description match the head commit, including the receipt and the stack.
  • New tests fail before the change, pass after it, and skip cleanly without their dependency. (No new test. The step fails to compile on 3e37f94 and passes here.)
  • Comments and docstrings are one line. No measurements or history in the source. (The diff adds no comment.)
  • No personal data, machine names, internal hosts or local paths in the diff or its commits. No AI attribution lines.

@ashhart

ashhart commented Nov 6, 2026

Copy link
Copy Markdown
Owner

Thanks @jishnuvenugopal. Confirmed on an Apple M3 Ultra: zig build test-metal-residency-owners-host passes 5/5 steps and 68/68 tests with this commit. Without it, it fails on exactly the missing member: moe_gpu.zig:6:16: root source file struct 'residency_owner_tests' has no member named 'affine_mm'.

It's in the landing queue, with a CHANGELOG line that thanks you. Once it lands, the step can come off #2095's exclusion list, as you say.

@ashhart

ashhart commented Nov 6, 2026

Copy link
Copy Markdown
Owner

/atc exchange 3e17c53089ba0120568ae4318704fa5ade6905ef70a6c936104c9eb7aaff60c8

@ashhart
ashhart force-pushed the fix/residency-owners-affine-mm branch from 238ace8 to 6037571 Compare November 6, 2026 22:44
ashhart added a commit to jishnuvenugopal/TensorFold that referenced this pull request Nov 6, 2026
@ashhart
ashhart force-pushed the fix/residency-owners-affine-mm branch from 6037571 to dc0cfc1 Compare November 7, 2026 00:06
@ashhart
ashhart merged commit e2b2dc1 into ashhart:main Nov 7, 2026
3 of 7 checks passed
@ashhart

ashhart commented Nov 7, 2026

Copy link
Copy Markdown
Owner

Thank you @jishnuvenugopal. This is merged into main with your commits under your own name, so you're listed as a TensorFold contributor. It ships in the next release, credited to you in the changelog and the release notes.

@jishnuvenugopal
jishnuvenugopal deleted the fix/residency-owners-affine-mm branch November 7, 2026 00:41
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