forked from ggml-org/llama.cpp
-
Notifications
You must be signed in to change notification settings - Fork 46
rpc: one tensor read per decode step and asynchronous split copies #193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
danielhanchen
wants to merge
20
commits into
master
Choose a base branch
from
feature/rpc-stage2
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
c238f82
server: add --pipeline-groups to run the slots over several contexts
danielhanchen f96bb35
server: harden the pipeline group decode loop
danielhanchen 2bd1359
rpc: serialise the client connection and track the stored graph per c…
danielhanchen 4dc1b57
rpc: batch the tensor reads of a step and move the split tensors asyn…
danielhanchen c2f055a
rpc: keep the asynchronous copy to the backend's own buffer type
danielhanchen d9b25a7
ggml-backend: only ask the source backend for a copy a different back…
danielhanchen ed651ea
rpc: never open a second connection from the asynchronous paths
danielhanchen 25f208c
rpc: read a batched response in one receive
danielhanchen 2c336f3
remove the benchmark artefacts that were committed by accident
danielhanchen ec74a60
reduce comment volume in the rpc stage2 changes
danielhanchen bb0e9ac
rpc: recycle the async-copy event pool
danielhanchen 313019c
ggml-backend: give the source side of an async copy its own interface…
danielhanchen 433ef71
server: update the prompt cache only after waiting for the slot's group
danielhanchen 35c4ca6
ggml-backend: bump the backend API version for the enlarged interface
danielhanchen 7cf19c5
ggml-backend: require a real destination before delegating to the source
danielhanchen 4ed1cd0
rpc: validate GET_TENSORS entries before allocating the response
danielhanchen 47aaac3
rpc: advertise batched get as a server flag instead of a minor bump
danielhanchen 3b1f523
rpc: wait for every outstanding staging event, not just the last one
danielhanchen 6ca4b11
server: carry pipeline groups into router children and give each grou…
danielhanchen 6e2cbe7
rpc, server: close the staging reservation gap, free staging with its…
danielhanchen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -153,3 +153,4 @@ a.out.* | |
|
|
||
| AGENTS.local.md | ||
| .pi/SYSTEM.md | ||
| bench/ | ||
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When an executable loads a dynamic backend built against the previous interface, the loader still accepts it because
GGML_BACKEND_API_VERSIONremains 2, but adding this pointer enlarges the embeddedggml_backend_iand moves the core's expecteddeviceandcontextoffsets. Accessing such a backend can therefore reinterpret its old fields or call a non-function address; increment the backend API version so stale plugins are rejected.Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in 35c4ca6. Correct and I should have done it in the same commit that added the member: a backend compiled against version 2 hands over a struct one member short, and reading past the end of it is precisely the failure the load-time check exists to prevent. Version is now 3, with a note on the line saying what changed.