mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1153
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @maverns on GitHub (Oct 17, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2860
Machine: Apple M5 Max, 128 GB, macOS 27.0.1, Command Line Tools 27.0.0 (Apple clang 21.0.0), SDK 27.0.
Command: ./setup.sh --model UD-Q4_K_XL --vision no --no-browser --no-start --context 196608 --yes. It stops at step 4 with "the Metal engine did not build".
At
477ac13(current main), the compile fails. Six symbols are missing from metal/include/metal_compat/cuda_runtime.h:88a1c23f), plus cudaDeviceGetStreamPriorityRange and cudaStreamCreateWithPriority (added inbc90e1ac).33150724, #2666).At
a2de744(parent ofbc90e1ac), everything compiles but the link fails. The undefined symbols are strata::kernels::gdn_step_norm_groups, qsa_block_scores_rows and qsa_decode_attn_batch_rows. They are called from verify.cpp (Verifier::record_window, capture_commit_batch), but there is no Metal definition and no entry in metal/src/engine/stubs.cpp. They were introduced byf629fb04("Batch decode: one launch for all rows…").Possible fix: guard these call sites the way src/core/mtp.cpp already guards its stream-priority calls (#if … && !defined(STRATA_GPU_METAL)), or add Metal stubs.
@oceanio commented on GitHub (Oct 17, 2026):
Fix in #2895 (only metal/ changes).
Two additions to the report, at
477ac13on an M5 Max (128 GB, macOS 26.7.1, CLT 27.0):qsa_block_scores_rows, qsa_decode_attn_batch_rows, qsa_decode_attn_split, fused_gr_persist_init,
fused_gr_read_persist, handoff_publish, wait_handoff, wait_copy_i32_from_mapped, wait_flag_ge_stamped,
copy_rows_from_mapped_after, native_quantize_q8_1_il, hc_q8_to_bf16, res_patch, cpu::iq256_gu_rows_exact_one,
prefill::f16_range_read, prefill::gemm_f16_range_read, and the new f16img overloads of gr_norm, gr_norm_rs,
gr_write_norm_rs and gr_write_cvec_norm_rs. Gemm::bf16's stub in stubs.cpp also no longer matches (x_f16).
unconditionally (verify.cpp:646), and fused_gr_read_persist() sits on the hyper-connection read path. These
need "not available" answers, the way setup_host.cpp answers fused_gr_check().
v0.1.44.1 builds and runs on the same Mac unchanged; the PR's output is identical to it on the prompts I tried.
@cuijs2026 commented on GitHub (Oct 17, 2026):
Verified #2895 on a different Mac: Apple M4 Pro, 64 GB unified memory, macOS 26.2, Apple clang 21 (17.0.0 (clang-1700.6.3.2)).
477ac13unpatched: the same six undefined identifiers at compile (cudaDevAttrComputeCapability* Major/Minor,cudaDeviceGetStreamPriorityRange,cudaStreamCreateWithPriorityin verify.cpp;cudaMemcpyPeer,cudaDeviceDisablePeerAccessin peer_experts.cpp), thenGemm::bf16's stub signature mismatch at link stage prep. Confirms maverns' and oceanio's reports.ninja -C build-metal stratabuilds and links clean, no undefined symbols,strata --versionprints0.1.45-metal.engine_current()(setup_mac's BUILD.json digest check) agrees after the stamp is refreshed.One note for the PR: before finding this issue I had locally regenerated stubs with
metal/tools/gen_stubs.py(empty-first-link pass then the real one). It comes out functionally equal to stubs_145.cpp's list — 262 vs 262 matched — so the PR's hand-written stub list looks complete; the generated route may be a safety net worth mentioning in the Metal update docs, since regenerating needs a link log few will know to produce. Discarded my patch in favor of #2895.@nullspeech commented on GitHub (Oct 17, 2026):
Machine: Apple M2 Max (Mac14,5), 38-core GPU, 96 GB, macOS 15.8 (24H23), Command Line Tools with Apple clang 17.0.0 (clang-1700.0.13.5). Installed SDKs: MacOSX 14.5 / 15.2 / 15.5 — there is no macOS 26 or 27 SDK here, so this is the oldest-toolchain report on the thread.
At
477ac13c(tagv0.1.45), buildingbuild-metalfails in compilation with exactly maverns' six identifiers, seven error lines:So the break is not a CLT 27 regression: the same six names kill the Metal build on a 15.5 SDK too.
One thing #2895 will not cover on this OS, which the three reports above cannot show because they all run SDK 26/27:
MTLGPUFamilyMetal4is not declared by any SDK up to macOS 15.5, sometal/src/mtl_rt.mmdoes not compile here at all without an enum fallback for that constant. We carry a small local patch for it. It touches no file #2895 touches (metal_compat/cuda_runtime.h,stubs.cpp,stubs_145.cpp), so the two stack cleanly — but if 0.1.46 is meant to build on the SDKs macOS 15 users still have, an__has_include/ enum-fallback guard inmtl_rt.mmwould save them a third patch.On the "3 vs 21 undefined symbols" difference: at
477ac13cthe compile aborts before anything links, so this box never reaches the link stage. We can only confirm maverns' six names; oceanio's larger link-stage count and cuijs2026's clean link with #2895 are both on newer SDKs and I have no data point either way. I can buildv0.1.45 + #2895 + the enum fallbackhere and report whether it links on a 15.5 SDK, if that's useful.Nothing is blocked on our side: we stayed on
0.1.44.1-metal, the updater rolled back by itself, and the server is healthy.@nullspeech commented on GitHub (Oct 17, 2026):
Following up on my report above: the macOS 15 half of this is already written — PR #2388 (open since 2026-10-14, +4/−1, one file).
metal/src/mtl_rt.mm'ssupports_metal4()namesMTLGPUFamilyMetal4, which is declared only in the macOS 26 SDK, so on macOS 15 the Metal engine does not compile even after #2895 adds the six HIP/CUDA names. The PR declares the same numeric family (5002, which the repo's own vendored metal-cpp already uses atthird_party/metal-cpp/Metal/MTLDevice.hpp:193) and casts it at the single call site, leaving the@available(macOS 26.0, *)gate untouched, so a 26-SDK build emits an identical call.Two things worth recording for whoever merges:
metal/src/mtl_rt.mmonly — no overlap with #2895's three files, so the two are independent and can go in either order. A macOS 15 build needs both.v0.1.44.1-metalbinary was built with, and that engine has served Flash-Next IQ3_S on this machine since 2026-10-14 without incident, so the change itself is exercised, not theoretical.Happy to build
v0.1.45 + #2895 + #2388on this 15.5 SDK and report the result here, so the thread has one data point from an old-toolchain Mac — say the word.@Niko1221 commented on GitHub (Oct 19, 2026):
Thanks for taking the time to report this.
We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.