Repository navigation
Conversation
|
Independent device run at The exact head merges cleanly with After the DFlash2 merge, this head conflicts with Igor Lessio - AIFLOW LABS |
|
Thanks @gilby. Fusing the 8-bit/64 shared expert into the 4-bit/64 routed MoE reads correct: uniform 4-bit/64 layers keep their pipelines, the mixed layers match The GLM DFlash2 work that landed on main conflicts with this branch in two places. We're rebasing it ourselves, keeping your commit as it is, and then running it on our M5 Ultra and M3 Ultra Macs. We'll post the results here.
|
e003903 to
9d2bcbc
Compare
|
I checked current heads In a scratch resolution I kept both families’ registrations and tests, assigned KVB8 jobs to slots 27–29 and SH8 jobs to 30–35, and left the optional M3 job last at 36. On M5 Max with Zig 0.17.0,
The combined Igor Lessio - AIFLOW LABS |
|
Thanks @gilby. The shared 8 path retains the wide reference's four-term dot grouping and final combine placement, and the direct fixture compares BF16 output bits exactly. Uniform 4/64 keeps its pipeline selection. The new contract collector needs partial-construction cleanup: a later pipeline or append failure can lose the Suite and completed probes. Please unwind completed resources and roll back exported entries, with focused failure coverage. We can handle the main overlap; final combined-tree numerical checks remain open.
|
|
@gilby, about the probe-registration cleanup our review asked for: the same two-append pattern was on main in 85 places, and #5058 (now merged) fixes it there with one helper, errdefer p.deinit(); // with errdefer s.a.destroy(p) after create, as the suite's teardown frees it
try ct.register(s.a, &s.probes, &s.kernels, p, p.kernel());Using it for this PR's new suites closes that item.
|
Extend the fused Metal MoE gather/down kernels (moe_gateup_0_sh8, moe_down_0_sh8, _one, and _pick) via uint4 8-bit/64 shared-expert loads so mixed 4/64 routed + 8/64 shared layers stay on the single fused path instead of falling back to unfused wide launches. Includes M1/M2 512-thread reservation, contract gates/controls/records, and bit-exact parity unit test. Refs ashhart#3152
9d2bcbc to
78abb48
Compare
|
Updated
Verification (
|
|
Thanks for the transactional contract collector, which closes the review's probe-registration ask. Decision: ready for our review and device run. The zero-regression set on the The fused
|
|
@gilby, same finding here as on #4248, from our M3 Ultra run (GLM-5.3-Flash MLX 4-bit, main against this head, base, new, new, base). Tokens are equal on every prompt row, but decode right after an 8K prompt is 16% slower (40.0 against 33.6 tok/s, steady in both runs of each side), and 2K cells are level. Since #4248 shows the same shape, it may be one cause across the series: something in the decode path that grows with cache length on pre-M5 chips. A per-kernel timing of one decode step after an 8K prompt would show it. We'll hold both until we know.
|
Synthena Initial Review — Performance receipt required (
|
|
Updated onto 1. Review Fix & Contract Verification
2. Apple M3 Ultra Post-8K Kernel Profiles (
|
|
A correction to our automated review: Your committed receipt passes verify; the golden-hash status checks our own reference hashes, so that part is ours and nothing more is needed from you for it.
|
What this changes
Extends the fused Metal
4/64MoE gather/down kernels (glm_moe_gateup_0_sh8,glm_moe_down_0_sh8,_one, and_pick) withuint48-bit/64-group shared-expert loads so mixed4/64routed +8/64shared layers stay on the single fused MoE launch (both+combine_0) instead of falling back to unfusedwide.moelaunches.sh8Sourceinzig/src/families/glm/moe_sh8.zig(re-exported inkernels.zig) witherror.Sh8TemplateMismatchdiagnostic and host test, explicitm3_slotindexing inkernels.zig,[[max_total_threads_per_threadgroup(512)]]on thegateupkernels, and 6sh8pipelines loaded alongsidemoe_gateup_0*/moe_down_0*.shared8/canBothand fusedsh8dispatch inzig/src/families/glm/moe.zig.glm sh8contract launches, planted controls, M1/M2 offline records (zig/src/core/contract/glm_sh8_records.zig), and bit-exact parity testzig/src/families/glm/sh8_moe_test.zig.Checks & Performance Receipt (
7513e6671a945df370543ba6648c938e15874adf, codeba662f203051)origin/main(9cd11ef068adf656f9a84dd7014ae3b64d230887).zig test zig/src/families/glm/moe_sh8.zig(All 1 tests passed.),zig fmt --check build.zig zig,python3 tools/zig/env_names.py(841 variables read, 0 problems),python3 tools/pr_check.py --base origin/main --pr 4249(0 error(s)).--only "glm sh8":applegpu_g15, tensor units false):SUMMARY 2 kernels: 2 pass gates 1-4, 0 fail, 0 known findings; 2 controls: 2 red as planted, 0 missed; 0 limit problems; gates 1229 ms, limits 470 ms.applegpu_g17, tensor units true):SUMMARY 2 kernels: 2 pass gates 1-4, 0 fail, 0 known findings; 2 controls: 2 red as planted, 0 missed; 0 limit problems; gates 1233 ms, limits 16 ms.docs/receipts/glm-metal-moe-sh8/perf-receipt.json(verifiedPASS perf-receipt 534f236f726c0c76against merge-base9cd11ef068adand branchHEAD):Jundot/GLM-5.3-Flash-oQ4e-mtp,--draft --check-draft,--pairs 2):+3.02%(58.119 -> 59.876 tok/s, base-vs-base noise0.80%, head beats base in every ABBA pair),4/4promptstoken_equal: true(exactness_sha256: 142d8d9479751bcc3b33ae7cc0224231758c22566a94af6d0d118ab16ab7d359),draft_check.equal: true.tf-glm-runpost-8K profiles (8,205-token prompt,GLM_CAP=10240,GLM_PROFILE):Jundot/GLM-5.3-Flash-oQ4e-mtp(GLM_DEPTHS=0,3):all 32 tokens equal,depth 0 == depth 3(hash 205fd10a8f874895); depth-0 decode38.8–38.9 -> 40.7–40.9 tok/s(+5.1%); 1-row step25.487–25.597 ms -> 24.251–24.264 ms(-4.8%to-5.2%),sharedclass cut2.259 -> 1.064 ms.zai-org/GLM-5.3-Flash-MLX-4bitcontrol (GLM_DEPTHS=0):all 16 tokens equal(hash 8e6cfa0e46473e90); 1-row step18.700 -> 18.723 ms(+0.12%, zero post-8K regression).