Skip to content

Fix fast synch when fence is waited before a command buffer is created#2657

Merged
awni merged 1 commit intomainfrom
fix_fast_synch
Oct 8, 2025
Merged

Fix fast synch when fence is waited before a command buffer is created#2657
awni merged 1 commit intomainfrom
fix_fast_synch

Conversation

@awni
Copy link
Copy Markdown
Member

@awni awni commented Oct 8, 2025

As title.

I didn't add a test for this because we don't test the fast synch yet (maybe we should?)..

@awni
Copy link
Copy Markdown
Member Author

awni commented Oct 8, 2025

The test case would be something like:

import mlx.core as mx

def fun():
    return mx.squeeze(mx.array([1.0]), stream=mx.cpu) + mx.array(1.0)

mx.synchronize() # should commit active command buffers
print(fun())

Copy link
Copy Markdown
Member

@angeloskath angeloskath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! I am glad this ended up being an easy fix.

@awni awni merged commit f5d4397 into main Oct 8, 2025
6 checks passed
@awni awni deleted the fix_fast_synch branch October 8, 2025 18:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants