[P/D] Implement Non-blocking/Async D2H optimization for kv fetching a… #2024
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.
…t prefill
The NON_BLOCKING mode is functionally ready while the ASYNC mode has piece missing and is right now just for dev use
Essential Elements of an Effective PR Description Checklist
Purpose
This commit is to significantly reduce the kv fetching overhead at prefill
Test Plan
Prefill-only test and E2E test
Test Result
Tested on G3D with bs=8 from 287 ms to
97 ms (NON_BLOCKING mode)
0 ms (ASYNC mode)
And according to prefill-only test with a G3D P/D setup (1P2D, 3.5K/1), the NON_BLOCKING mode increase the prefill throughput for around 8%