Repository navigation
fix(strata): build main for Metal again (cudaPointerAttributes in mtp.cpp, link latent_tables.cpp) - #243
Merged
shuk777 merged 1 commit intoNov 16, 2026
Conversation
Since 753269a the Metal build fails twice: src/core/mtp.cpp uses cudaPointerAttributes, which the Metal runtime does not have, in mtp_dev_of and in the cross-card check of the drafter's prefill; and the engine references LatentTables, whose source file metal/CMakeLists.txt does not list. On Metal mtp_dev_of reports device 0 and the cross-card check is compiled out (one device, one memory), and src/core/latent_tables.cpp joins the Metal host sources.
toshi38
marked this pull request as ready for review
November 16, 2026 07:48
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.
What & why
maindoes not build for Metal since753269a. Two things, both small:src/core/mtp.cppusescudaPointerAttributes, which the Metal runtime does not have, inmtp_dev_of(theSTRATA_MTP_DEVdiagnostic) and in the cross-card check of the drafter's prefill. On Metalmtp_dev_ofnow reports device 0 and the cross-card check is compiled out: there is one device and one memory, so rows never come from another card.LatentTables, andmetal/CMakeLists.txtdoes not listsrc/core/latent_tables.cpp. It joins the Metal host sources; it compiles there unchanged.Nothing changes for the CUDA and HIP builds: the two
mtp.cppedits are inside#if defined(STRATA_GPU_METAL)/#if !defined(STRATA_GPU_METAL), and the other is in the Metal CMake file only.Fixes #242
Area
edge0-infer/)edge0-infer/tools/assets/)edge0-infer/examples/)docs/)edge0-strata/src/core/mtp.cpp,edge0-strata/metal/CMakeLists.txt)How was it tested?
Machine: MacBook Pro, Apple M4 Max, 64 GB, Metal. Built on
mainat257ff84asEDGE0.mddescribes.strataandmoe_mm_paritybuild.moe_mm_parity --gu Q3_K --dn IQ4_NL --latent --v2 --stage-gu --tile 32,64,32,2 --T 64, with and without--latent1792: PASS.ctestin the Metal build directory: 1 of 1.tools/verify_metal_latent.pywithEdge0-145B-q3k(du=q4,ple-io=direct,STRATA_METAL_PROMPT_CHUNK=2048): 14 of 14.Not done:
7b60076). I started one and the machine ran out of memory under other work, so I have no result either way.verify_metal_latent.pypassing is the evidence that the engine answers.edge0-infertest levels: the change does not touchedge0-infer/.STRATA_MTP_DEV=1on Metal (it now prints device 0 for every buffer).Checklist
ctest --preset cpu -L "L0|L1"passes locally inedge0-infer/(engine changes): not run,edge0-infer/is untouchedmoe_mm_parity, the Metalctest,tools/verify_metal_latent.py