Add kv_cache_dtype consistency check between prefill and decode#19398
Closed
YAMY1234 wants to merge 1 commit intosgl-project:mainfrom
Closed
Add kv_cache_dtype consistency check between prefill and decode#19398YAMY1234 wants to merge 1 commit intosgl-project:mainfrom
YAMY1234 wants to merge 1 commit intosgl-project:mainfrom
Conversation
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Collaborator
|
/rerun-stage stage-c-test-8-gpu-h20 |
Contributor
|
✅ Triggered |
Contributor
5 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Motivation
When prefill and decode use different kv_cache_dtype (e.g. prefill bf16, decode fp8_e4m3), the per-page item_len differs (32768 vs 16384). Since the transfer layer uses prefill's item_len to compute both src and dst addresses, this causes dst address overflow into unregistered memory at high concurrency, crashing with "Requested address not found" (Mooncake) or "NIXL_ERR_NOT_FOUND" (NIXL).
There is no dtype conversion in the transfer path, so mismatched dtype silently produces corrupted data at low concurrency and crashes at high concurrency. Add an item_len check when prefill receives decode's KV registration; on mismatch, log an error and refuse the peer instead of crashing the prefill process.
Modifications
Accuracy Tests
Benchmarking and Profiling
Checklist
Review Process
/tag-run-ci-label,/rerun-failed-ci,/tag-and-rerun-ci