docs: Do not pass MLX_METAL_FAST_SYNCH=1 by default - #4005
Merged
Conversation
zcbenz
reviewed
Aug 6, 2026
zcbenz
left a comment
Member
There was a problem hiding this comment.
I think instead of printing a warning we should remove it from the mlx.launch command in distributed.rst and only mention it in the side note as a faster but buggy flag. The plan was to make it default after fixing the hanging bug, but at the moment I don't see any hope of that and we probably would have to end up removing it.
Contributor
Author
|
That's better, done — the runtime warning is gone and Now docs-only, one file, +9/−4. |
zcbenz
approved these changes
Aug 6, 2026
The fast fence's GPU spin-wait has no guaranteed CPU/GPU memory coherence (per the Metal team, see ml-explore#3142) and can deadlock any multi-stream Metal workload, leaving the GPU wedged until reboot. Originally reported for distributed runs (ml-explore#3830), since confirmed single-node (four concurrent models on one Mac Studio), and the fence is inserted on any cross-stream edge, so the exposure is not limited to distributed. Emit a one-time warning the first time a fence is actually created in fast mode.
…time Per review: drop the runtime warning, remove the flag from the mlx.launch example in the distributed guide, and describe it in the side note as a faster but unreliable option, citing ml-explore#3142 and ml-explore#3830.
zcbenz
force-pushed
the
fix/warn-fast-synch-fence
branch
from
August 6, 2026 08:05
74a45dd to
374dc4e
Compare
zcbenz
force-pushed
the
fix/warn-fast-synch-fence
branch
from
August 6, 2026 08:06
374dc4e to
3c09de6
Compare
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.
Following up on #3830: since fast synch is not reliable and there is no fix in sight (per the discussion there and in #3142), this adds a one-time stderr warning the first time a fence is actually created in fast mode, so users hitting the wedge can find the cause without bisecting env vars. It fires on any multi-stream workload, not just distributed, matching the single-node report in #3830. One file, +12/−1, no behavior change beyond the message.