Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix donation in sdpa vector#3121

Merged
angeloskath merged 2 commits intomainfrom
sdpa-fix
Feb 12, 2026
Merged

Fix donation in sdpa vector#3121
angeloskath merged 2 commits intomainfrom
sdpa-fix

Conversation

@angeloskath
Copy link
Member

@angeloskath angeloskath commented Feb 12, 2026

Sneaky bug that would only show up when vector sdpa would donate the queries to the input and also be large enough to warrant a command encoder commit.

The bug is that arrays registered as temporaries should not span command encoders because they are removed from the list of outputs we keep track of.

I also deleted a few outdated checks for donation because they are pointless since we changed moving the buffer to copying it.

Fixes the issue in ml-explore/mlx-lm#868 .

Copy link
Member

@awni awni left a comment

Choose a reason for hiding this comment

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

Very nice find!!

@angeloskath angeloskath merged commit c184262 into main Feb 12, 2026
16 checks passed
@angeloskath angeloskath deleted the sdpa-fix branch February 12, 2026 18:46
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