Repository navigation
bump numen-tech/mlx to c134ee26 (v0.32.4 + fork patches); fence.metal probe reverted (gemma4-qat#299-#302) - #13
Merged
Merged
Conversation
…CH test (gemma4-qat#301)
…FAST_SYNCH test (gemma4-qat#301)" This reverts commit 98ee695. The fence probe (gemma4-qat#301) found no fence_wait / input_coherent in the shipped app metallib: Xcode compiles the package's default.metallib at the package floor (`metal -c -target air64-apple-macos14.0`), i.e. Metal 3.1, so the `__METAL_VERSION__ >= 320` guard empties fence.metal in every consumer build, not only in this package's own test build. The kernel can't ship from a SwiftPM package with a macOS 14 / iOS 17 floor, so the vendored file and its test are dropped; ml-explore#301's fence item stays open.
…Verify fallback after import)
…e_verify primitive for every K and on CPU; qdot comment)
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Bumps
Source/Cmlx/mlxto numen-tech/mlxc134ee26(ml-explore/mlx v0.32.4 plus the fork patches) and regenerates the vendored sources. Core PR: numen-tech/mlx#12. Tracking: gemma4-qat ml-explore#299, ml-explore#300, ml-explore#301, ml-explore#302.Commits
7dada83bumps numen-tech/mlx to 33ef381f and regenerates (LC_ALL=C tools/update-mlx.sh).98ee695vendorsfence.metalbehind a__METAL_VERSION__ >= 320guard and adds anMLX_METAL_FAST_SYNCHsmoke test (Added MLXCustomFunction + MLXClosure ml-explore/mlx-swift#301).b42818breverts98ee695. The fence probe below found thatfence.metalcan't ship from this package.26668c7bumps numen-tech/mlx to 4c4d61c5 (Rebase the fork onto v0.32.4; qmv_quad ragged-tile scale/bias read (gemma4-qat#302) mlx#12 review: SpecDecodeVerify rebuilds its fallback after import; touchesmlx/fast.cppandmlx/fast_primitives.h, which are compiled from the submodule, so no generated file changes).f1cb75ebumps numen-tech/mlx to c134ee26 (Rebase the fork onto v0.32.4; qmv_quad ragged-tile scale/bias read (gemma4-qat#302) mlx#12 review: spec_decode_verify primitive for every K and on CPU; qdot comment). Core adds the newmlx/backend/cpu/spec_decode.cpp, whichPackage.swiftcompiles through thebackend/cpudirectory (onlybackend/no_cpuis excluded, andmetal/spec_decode.cppis in the no-Metal exclude list). It regeneratesquantized.cppandmetal/quantized.h(comment-only: the 1-bitqdotcomment, 8+/-4-).The net diff against
prismis the7dada83bump plus the26668c7andf1cb75esubmodule moves.Regeneration check
7dada83touches 13 generated files (+88/-49). Every change traces to a core diff in317df531..33ef381f:conv.cpp,steel_conv_general.cpp,metal/conv.metal, and thesteel/convkernel and loader headers;quantized.cppandmetal/quantized.h, which carry the qmv_quad bounds predicate and theqmv_fast_implsimd_lidcast;include-framework/mlx-ops.h(minmax) andmlx-backend-metal-device.h(end_encoding(bool wait_in_flight = false)).f1cb75eregenerates onlyquantized.cppandmetal/quantized.h, both from the core comment change inquantized.h. The newcpu/spec_decode.cppis compiled from the submodule, andxcrun swift buildproducesspec_decode.owithSpecDecodeVerify::eval_cpudefined.update-mlx.sha second time is byte-identical except for one line: theAutogenerated from commit <sha>stamp ininclude-framework/Metal.hpp. metal-cpp's MakeSingleHeader writes the current mlx-swift HEAD into that line, so it changes after every commit. The stamp is kept at the parent commit (50f13c08), as in earlier bumps.cfc471f4, and the C bindings build without changes.Fence probe (ml-explore#301)
gemma4-qat was pinned to
98ee695, the guarded fence.metal. Then the Private LLM 2 app shell was built twice, once for macOS (Debug) and once forgeneric/platform=iOS(Release). Each shippedmlx-swift_Cmlx.bundle/default.metallibwas then searched withstrings -a:rmscontrolrms(float32|float16|bfloat16)exactfenceThe products-dir copies of both bundles give the same counts.
Xcode compiles every
.metalfile in the package at the package's deployment floor:metal -c -target air64-apple-macos14.0for macOS andair64-apple-ios17.0for iOS. That is Metal 3.1. The guard therefore turnsfence.metalinto an empty unit in consumer app builds as well as in this package's own test build, whereFenceFastSynchTestsfailed withUnable to load kernel fence_updateunderMLX_METAL_FAST_SYNCH=1. The consumer's deployment target (iOS 26 / macOS 26) doesn't reach the package's metal compile.Decision: revert. SwiftPM compiles the package metallib at its floor, so
fence.metalcan't ship until the package floor reaches Metal 3.2 or the kernel is built some other way. The fence item in gemma4-qat#301 stays open.MLX_METAL_FAST_SYNCHdefaults to 0, so the default path never asks for the missing kernels.Tests
f1cb75e:xcodebuild test -scheme mlx-swift-Package -destination 'platform=macOS' -skipPackagePluginValidation -parallel-testing-enabled NOgave TEST SUCCEEDED: 391 tests, 2 skipped, 0 failures. At98ee695the same command gave 392 tests, 3 skipped, 0 failures; the extra skip was the fence test, which skips without the env var.f1cb75e:xcrun swift build --disable-automatic-resolutiongave Build complete!.NumenCoreTestsForwardParityTests,Gemma4AttentionTests,Gemma4PrimitivesTestsandGemma4RoPETestsgave TEST SUCCEEDED: 29 tests, 0 skipped, 0 failures.Codex round: the review of
50f13c08..26668c7found one P2.MLX_METAL_FAST_SYNCH=1asks for fence kernels this package doesn't ship. That's the item gemma4-qat#301 keeps open; the default path never asks for those kernels. It found nothing else. Thef1cb75ebump toc134ee26had a task review and a symbol check (eachSpecDecodeVerifymethod is defined exactly once in the Apple build), not a Codex pass.