Skip to content

train 1125075558: #4981 #4987 #5002 (CI only) - #5008

Closed
ashhart wants to merge 11 commits into
mainfrom
lead/train-1125075558
Closed

ashhart wants to merge 11 commits into
mainfrom
lead/train-1125075558

Conversation

@ashhart

@ashhart ashhart commented Nov 25, 2026

Copy link
Copy Markdown
Owner

CI for a landing train: #4981 #4987 #5002 stacked on main in that order. Nothing merges from this PR: each PR above lands on its own once this tip is green, and this PR is then closed.

gilby and others added 11 commits November 25, 2026 07:56
…d guards

Refs #4961

- Add explicit max_total_threads_per_threadgroup(32|128|256) attributes matching launch records across glue, glue_split, loop, loop_split, runtime, and dspark Metal shaders to clear offline M1/M2 reservation mismatches.

- Enforce pipeline.maxThreads() guards at load time in attention, glue, loop, dspark_kernels, and model.

- Verify shader reservation attributes against contract records in host tests.
…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.
… 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.
…at a CUDA start

Kolibri-1 read it with getenv outside the registry (backend.zig's envOff): exact 0 turned the one-row step
graphs and, since #4884, the multi-row decode round graphs off, and every other text, blank, 1, "false" or
"off" included, kept them on. It is now a .cuda flag row in platform/environment.zig, read once in
Kolibri.init through the registry:
- unset, blank and 1 keep the graphs (the default, as before); 0 runs both eager (as before);
- any other text, which read as on before, is refused by name at a CUDA start, like every registered setting.
docs/environment.md documents it in the CUDA table; tokens are the same either way.

Tests: environment_kolibri_test.zig (blank and unset keep the default, 0 and 1 accepted, other text refused by
name on CUDA and ignored on Metal), and the setting in environment_test.zig's table of every row.
@ashhart

ashhart commented Nov 25, 2026

Copy link
Copy Markdown
Owner Author

CI red on this tip (zig-b); the PRs go on as two smaller trains.

@ashhart ashhart closed this Nov 25, 2026
@ashhart
ashhart deleted the lead/train-1125075558 branch November 25, 2026 08:53
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