Repository navigation
fix: GemmaPrefillBridge Sendable + benchmark resource path - #43
Merged
Merged
Conversation
- GemmaPrefillBridge: @unchecked Sendable + nonisolated(unsafe) on shared (fixes Swift 6 strict concurrency error in alpha) - InferenceBenchmark: load prompts from Resources/llm-test-prompts/ (files live in subdirectory, not Resources/ directly) Co-Authored-By: tturney1@gmail.com Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
ekryski
added a commit
that referenced
this pull request
May 14, 2026
Add documentation/turbo-kernels.md explaining what each of the 11 custom Metal kernels in the upstream ekryski/mlx fork does, when it runs, where its source lives, and how it's wired in Swift. Covers: * Encode family: turbo_fused_encode, turbo_fused_encode_wht * A-path attention family: turbo_flash_p1 (+ causal/nr0 variants), turbo_flash_pass2 (+ fused_rot variant), turbo_flash_sdpa_v * Separated fallback: turbo_score, turbo_value * B-path support: turbo_dequant_rotated Plus a routing-decision map (A vs B path, single-pass vs two-pass TurboFlash), the env-var tunables table, and a section explaining why TurboQuant peak GPU matches `--kv none` (lazy-compression two-phase architecture vs AffineQuantizedKVCache's write-time quantisation). Future-work section enumerates 12 optimisation candidates split into three buckets: already specced in #43, broader audit in #42, and six items not yet specced (fused K+V dequant kernel, pass1+pass2 fusion at small ctx, eager prefill encode, adaptive per-layer precision, sparse-V auto-tune, FWHT for value rotation). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
ekryski
added a commit
that referenced
this pull request
May 15, 2026
Add documentation/turbo-kernels.md explaining what each of the 11 custom Metal kernels in the upstream ekryski/mlx fork does, when it runs, where its source lives, and how it's wired in Swift. Covers: * Encode family: turbo_fused_encode, turbo_fused_encode_wht * A-path attention family: turbo_flash_p1 (+ causal/nr0 variants), turbo_flash_pass2 (+ fused_rot variant), turbo_flash_sdpa_v * Separated fallback: turbo_score, turbo_value * B-path support: turbo_dequant_rotated Plus a routing-decision map (A vs B path, single-pass vs two-pass TurboFlash), the env-var tunables table, and a section explaining why TurboQuant peak GPU matches `--kv none` (lazy-compression two-phase architecture vs AffineQuantizedKVCache's write-time quantisation). Future-work section enumerates 12 optimisation candidates split into three buckets: already specced in #43, broader audit in #42, and six items not yet specced (fused K+V dequant kernel, pass1+pass2 fusion at small ctx, eager prefill encode, adaptive per-layer precision, sparse-V auto-tune, FWHT for value rotation). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
div0-space
pushed a commit
to LibraxisAI/mlx-swift-lm
that referenced
this pull request
Nov 29, 2026
The Layr-Labs/mlx-swift revision moves from 8d927e6d to eedca444, the new mlx-swift#63 head. It pins mlx ff4bb35b (Layr-Labs/mlx#43, a freed compiled closure is erased from every thread compile cache, on top of main with ekryski#40) and mlx-c 004c735f. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
div0-space
pushed a commit
to LibraxisAI/mlx-swift-lm
that referenced
this pull request
Nov 29, 2026
Pin mlx-swift eedca444 (mlx ff4bb35b: ekryski#40, ekryski#43)
div0-space
pushed a commit
to LibraxisAI/mlx-swift-lm
that referenced
this pull request
Nov 29, 2026
SDK main gained ml-explore#358: Package.swift pins Layr-Labs/mlx-swift eedca444 (was 6c31f9f1), which pins mlx ff4bb35b (Layr-Labs/mlx ekryski#43: a freed compiled closure is erased from every thread compile cache; ekryski#40: float16 and bfloat16 floor divide in float32) and mlx-c 004c735f. Clean merge.
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.
Summary
Two small fixes needed after the alpha cleanup merges:
GemmaPrefillBridge Sendable: alpha's Swift 6 strict concurrency rejects the
static let sharedwithout Sendable conformance. Add@unchecked Sendable+nonisolated(unsafe).Benchmark resource path: prompt files live in
Tests/Benchmarks/Resources/llm-test-prompts/but the code was looking inResources/directly. Add the subdirectory to the path.Test
After these fixes, benchmark runs clean:
🤖 Generated with Claude Code