Issues / #2860

#2860 macOS Metal build broken: CUDA-only symbols missing from metal_compat and Metal stubs (compile at 477ac13, link at a2de744)

open · @maverns · 0 comments · View on GitHub

Setup & installServer & APINVIDIA / CUDAModels & quants

Description

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:
- src/core/verify.cpp: cudaDevAttrComputeCapabilityMajor and cudaDevAttrComputeCapabilityMinor (added in 88a1c23f), plus cudaDeviceGetStreamPriorityRange and cudaStreamCreateWithPriority (added in bc90e1ac).
- src/core/peer_experts.cpp: cudaMemcpyPeer and cudaDeviceDisablePeerAccess (added in 33150724, #2666).

At a2de744 (parent of bc90e1ac), 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 by f629fb04 ("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.

Related on this site

Quick links to related pages.