Skip to content

ggml-backend: fix async set/get fallback sync#19179

Merged
JohannesGaessler merged 1 commit intoggml-org:masterfrom
JohannesGaessler:ggml-backend-fix-async-set-get
Feb 2, 2026
Merged

ggml-backend: fix async set/get fallback sync#19179
JohannesGaessler merged 1 commit intoggml-org:masterfrom
JohannesGaessler:ggml-backend-fix-async-set-get

Conversation

@JohannesGaessler
Copy link
Collaborator

While working on an implementation for backend-agnostic tensor parallelism I found what I believe to be a bug in the ggml backend code. For a minimal implementation I did at first not implement set_tensor_async and get_tensor_async assuming that I could just rely on the synchronous fallback and implement those later. However, set_tensor_async and get_tensor_async do not call ggml_backend_synchronize for their fallback so I got incorrect results. This PR adds the corresponding calls.

@github-actions github-actions bot added the ggml changes relating to the ggml tensor library for machine learning label Jan 29, 2026
Copy link
Member

@slaren slaren left a comment

Choose a reason for hiding this comment

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

This change looks good to me. The copy should happen after all previously queued operations, so a synchronization is necessary if the backend does not implement async get/set.

@JohannesGaessler JohannesGaessler merged commit 59377a6 into ggml-org:master Feb 2, 2026
77 of 147 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants