fix(engine): load prefill triton kernels at startup, not mid-request - #169
Open
jason-fxz wants to merge 2 commits into
Open
fix(engine): load prefill triton kernels at startup, not mid-request#169jason-fxz wants to merge 2 commits into
jason-fxz wants to merge 2 commits into
Conversation
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.
Two changes, one goal: no triton compile / cuModuleLoadData on the request path.
fla/l2norm:do_not_specialize=["T"],Twastl.constexpr: a new module per unseen prompt length, forever._warmup_prefillruns on every attention backend (wastriton-only, sofi/fahad no prefill warmup), over a config-derived ladder covering every in-repo size bucket instead of[80, 128]. New--skip-prefill-warmup;FREETOKEN_WARMUP_MAX_LENcaps the ladder.Suspected trigger of the sm_89 silent hangs (#123, #72; #31 has a py-spy stack inside cuModuleLoadData): a first-launch module load mid-forward on the scheduler thread.
Tested on H100 (driver 580.95.05, torch 2.11.0+cu130),
nvidia/Qwen3.6-35B-A3B-NVFP4, offload + fi: l2norm bitwise equal, same latency; a 11..2560-token sweep loads zero in-repo kernels at request time (main: 4-10 per new size); first-request TTFT on a cold cache 15.1 s -> 0.6 s; warmup adds 4.1 s to startup on a warm cache.The hang does not reproduce on sm_90. This PR removes the trigger; confirming the fix needs
an sm_89 card.
Refs #123, #72.