Repository navigation
Conversation
…heckpoint_metal reads checkpoint_metal.zig reads safetensors and checkpoint_file_cache through core (since ec277c1), and in test-metal-residency-owners-host core is residency_owner_tests.zig, which exported neither, so the step stopped compiling. The root now exports both, as zig/qwen27_core.zig does.
The native-inventory test builds its auxiliary draft model as undefined and sets the backend's fields one by one, but never attention_full. Its null default does not apply to undefined memory, so the optional read as present and appendDraft listed a garbage buffer (id 0xaaaaaaaaaaaaaaaa); Resident.hold then faulted reading its length (residency_recording_metal.zig:117, from resident.zig:165). The fixture now sets attention_full = null, as a draft without a v1 full layer has. The residency owner code was right.
ashhart
force-pushed
the
lead/residency-owners-test
branch
from
November 25, 2026 03:38
374bda8 to
6dc55e5
Compare
… shared engine Two real wiring gaps on a macOS host, found by type-checking the steps for aarch64-macos: - test-qwen27's first test binary is the qwen27 module itself, which since 6efef02 holds mtp_pick.zig and its @import("bf16_topk"), but the module never got that import (qwen_core and the engine did). It now does (zig/build/qwen27.zig:108), the same s.bf16_topk module. - native/metal.zig reaches native/inkling2.zig through tensorfold, and that file imports engine_api; the engine metalEngineModules builds has none until the native server adds one. compile-metal-residency-host and test-slide-metal-host compiled native/metal.zig against that engine and failed. build.zig now gives the shared macOS host engine one engine_api, and the residency, slide and Flash Next budget hosts take the engine's module instead of a second copy of the file.
The Linux host shards excluded it as red on main (#2031); it passes since the two commits before the changelog line. The exclusion goes and the step joins linux_host, which shard A runs on every push (the step's own name also hashes to shard A, so it runs once). compile-metal-residency-host is already in macos_adapters.
… Inkling 2 and H3 image modules compile-fsr-metal-contract-host (zig/build/fsr.zig) and compile-gemma4-contract-host (zig/build/gemma4_host.zig) each compile zig/tests/contract/metal_main.zig, which since the Inkling 2 Mini and H3 image contracts also imports inkling2_metal, inkling2_glue_plan, inkling2_loop_plan, inkling2_runtime_plan and the three H3 image kernel modules. Only tf-kernel-contract (kernel_contract.zig) passed them, so both compile-only roots failed on a macOS host with "no module named 'inkling2_metal'". kernel_contract.metalRootImports now gives a root that set, sharing the engine's own inkling2 modules (a file belongs to one module), and both roots use it.
This branch has not been deployed
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.
zig build test-metal-residency-owners-hoststopped working on main. Two separate problems caused it:checkpoint_metal.zignow reachessafetensorsandcheckpoint_file_cachethroughcore. In this step,coreis the test rootzig/residency_owner_tests.zig, and that root exported neither module. It now exports both, the same wayzig/qwen27_core.zigalready does.undefinedand then sets the backend's fields one at a time. It never setattention_full, so the optional's= nulldefault did not apply.appendDraftthen listed a buffer whose contents were garbage. The fixture now setsattention_full = null, which is what a real backend gets frominitwhen the draft has no v1 full layer. The residency owner code itself was correct.Only test code changes. No behaviour or output tokens change.
Checks: the step fails on main before this change and passes with it. fmt and
git diff --checkare clean, and the line caps and gradient-serving pins hold.Two more steps that were broken on main, fixed in the same way:
test-qwen27didn't compile. Since the MTP draft-pick change,qwen27/mtp_pick.zigimportsbf16_topk, but theqwen27module inzig/build/qwen27.zigwas never given that import. It now gets it, the same wayqwen_coreand the engine already do.compile-metal-residency-hostandtest-slide-metal-hostdidn't compile on macOS.native/inkling2.zig, reached through the engine, importsengine_api, but the shared macOS host engine inbuild.zighad no such module. The engine now has oneengine_apimodule. The host steps that import it too (residency_host.zig,slide_host.zig,flashnext_budget.zig) take the engine's module instead of building a second copy, because a file can belong to only one module per compilation.CI:
test-metal-residency-owners-hostis back in the Linux host shards. Its stale exclusion inzig/build/host_tests.zigis removed, and it is added to thelinux_hostlist inzig/build/host_ci.zig.Only build wiring, CI lists and test code change. No engine code changes, and no output tokens change.