Repository navigation
Fix shardInPlace wrong integer split positions on quantized layers - #503
Merged
Merged
Conversation
davidkoski
approved these changes
Oct 19, 2026
davidkoski
left a comment
Member
There was a problem hiding this comment.
Change looks good, thank you!
8 of 9 tasks
tsnAnh
pushed a commit
to TitoniumLab/mlx-swift
that referenced
this pull request
Nov 7, 2026
Brings in the seven upstream commits after 35c10b4: ml-explore#481 (Sendable closures and 3-parameter VJP for MLXCustomFunction), ml-explore#503 (shardedToAllPredicate), ml-explore#494 (iOS 26.2 launch crash from Logger.isEnabled), ml-explore#498 (GPU.deviceInfo device selection), ml-explore#418 (MaterializedArray is Sendable), ml-explore#505 (tripletLoss fix). The cLogSupport removal in release.yml comes in with the merge; no fork-side edit was needed. No conflicts. Co-Authored-By: Claude Haiku 5.5 <[email protected]>
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.
Proposed changes
This PR brings one fix from ml-explore/mlx#4715 to MLX-Swift (the two other fixes in 4715 were already in MLX-Swift). It fixes integer split positions in
shardInPlacethat could split in the wrong places for quantized layers. The issue is fixed by using the existingquantizedShardedToAllPredicatethatshardLinearalready used. Misaligned positions now throw instead of silently failing and returning wrong tensors.Tests added to
DistributedNNTestsandDistributedNNRingTestsChecklist
pre-commit run --all-filesto format my code / installed pre-commit prior to committing changes