-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[None][chore] Mass integration of release/1.1 #8200
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
base: main
Are you sure you want to change the base?
Conversation
/bot run --disable-fail-fast |
38df6f2
to
d6b0316
Compare
/bot run --disable-fail-fast |
PR_Github #20805 [ run ] triggered by Bot |
PR_Github #20806 [ run ] triggered by Bot |
PR_Github #20805 [ run ] completed with state |
📝 WalkthroughWalkthroughAdds many Git LFS pointer files for precompiled cubins, a small header formatting fix, guarded fusion-scale checks in LLaMA models, CUDA-graph-aware KV-cache and expanded warmup sequencing in the model engine, refactors speculative drafter signature to accept LlmRequest, and updates tests. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor U as User
participant ME as ModelEngine
participant GW as get_warmup_request
participant GU as general_warmup
participant CG as CUDA_Graph_Capture
U->>ME: initialize(engine, config)
ME->>GU: general_warmup(reverse=false)
loop pre-capture warmups (small→large)
GU->>GW: get_warmup_request(num_tokens, num_gen_tokens, least_requests=True)
GU-->>ME: run warmup batch
end
alt CUDA graph enabled
ME->>CG: capture graph (piecewise batches)
note right of CG: capture uses selected batch sizes
ME->>GU: general_warmup(reverse=true)
loop post-capture warmups (large→small)
GU->>GW: get_warmup_request(..., least_requests=False)
GU-->>ME: run warmup batch
end
end
ME-->>U: engine ready
rect rgba(220,235,255,0.6)
note right of GU: New/changed: general_warmup, reverse pass, piecewise capture, least_requests flag
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 5
🧹 Nitpick comments (5)
tensorrt_llm/_torch/speculative/model_drafter.py (1)
31-45
: Normalize tokens to List[int] and avoid in-place mutation of request tokens.get_tokens(0) may return a tensor/pybind vector; ensure Python list[int] and copy before modifying to prevent side-effects on the original request.
Apply:
-def get_draft_model_prompt(spec_dec_mode: SpeculativeDecodingMode, - request: LlmRequest) -> List[int]: +def get_draft_model_prompt(spec_dec_mode: SpeculativeDecodingMode, + request: LlmRequest) -> List[int]: @@ - draft_input_tokens = request.get_tokens(0) + tokens = request.get_tokens(0) + # Normalize to a Python List[int] and copy to avoid mutating request state. + if hasattr(tokens, "tolist"): + draft_input_tokens = list(tokens.tolist()) + else: + draft_input_tokens = list(tokens) @@ - draft_input_tokens = draft_input_tokens[1:] + draft_input_tokens = draft_input_tokens[1:] @@ - draft_input_tokens.append(0) + draft_input_tokens.append(0) return draft_input_tokensIf you’re certain get_tokens already returns a list[int], keeping the tolist branch is harmless.
tensorrt_llm/_torch/pyexecutor/model_engine.py (3)
529-539
: Harden inputs: reject invalid num_tokens/num_gen_tokens.Add guards to avoid negative or inconsistent inputs (e.g., num_gen_tokens > num_tokens). It’s cheap and prevents silent misallocation.
Apply:
def get_warmup_request(num_tokens: int, num_gen_tokens: int, least_requests: bool = True): + if num_tokens < 0 or num_gen_tokens < 0: + return None available_tokens = kv_cache_manager.get_num_available_tokens( self.runtime_draft_len) available_blocks = kv_cache_manager.get_num_free_blocks() + if num_gen_tokens > num_tokens: + return None if num_tokens > self.max_num_tokens or num_tokens > available_tokens: return None if num_gen_tokens > self.batch_size: return None
569-578
: Defensive check to avoid division by zero in “most requests” path.Current guards make max_bs > 0, but a small future change could break that assumption. Add an explicit early return.
Apply:
- else: - max_bs = min(num_ctx_tokens, - self.batch_size - num_gen_tokens) + else: + max_bs = min(num_ctx_tokens, self.batch_size - num_gen_tokens) + if max_bs <= 0: + return None if num_ctx_tokens % max_bs == 0: num_full_seqs = max_bs else: num_full_seqs = max_bs - 1 max_seq_len = num_ctx_tokens // num_full_seqs num_left_over_tokens = num_ctx_tokens - max_seq_len * num_full_seqs
793-815
: Comment typo and clarity.Nit: “memory faction” → “memory fragmentation”; also clarify “num of requests” → “number of requests.”
Apply:
-# When using piecewise cuda graph, the logits may suffer severe memory faction problem. -# When the num of requests is growing, the block allocated by torch cannot be reused. +# When using piecewise CUDA graph, logits may suffer severe memory fragmentation. +# As the number of requests grows, blocks allocated by torch may not be reused.tests/integration/defs/accuracy/test_llm_api_pytorch.py (1)
646-669
: LGTM; consider guarding world size explicitly.Test mirrors tp4 variant and config is consistent. Optionally add skip_less_mpi_world_size(4) to ensure MPI world size matches 2x2 layout when running under MPI.
...b_rM_splitK2_TN_transOut_schedP2x1x2x3_biasM_bN_ldgsts_clmp_swiGlu_dynBatch_sm100f_cubin.cpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Enwei Zhu <[email protected]>
NVIDIA#7999) Signed-off-by: Jin Li <[email protected]>
…not provided in Llama3/4. (NVIDIA#7960) Signed-off-by: Yukun He <[email protected]>
d6b0316
to
3a199c4
Compare
/bot run --disable-fail-fast |
PR_Github #20808 [ run ] triggered by Bot |
PR_Github #20806 [ run ] completed with state |
PR_Github #20808 [ run ] completed with state |
Description
Cherry pick relesae/1.1 changes into main.
Test Coverage
N/A
PR Checklist
Please review the following before submitting your PR:
PR description clearly explains what and why. If using CodeRabbit's summary, please make sure it makes sense.
PR Follows TRT-LLM CODING GUIDELINES to the best of your knowledge.
Test cases are provided for new code paths (see test instructions)
Any new dependencies have been scanned for license and vulnerabilities
CODEOWNERS updated if ownership changes
Documentation updated as needed
The reviewers assigned automatically/manually are appropriate for the PR.
Please check this after reviewing the above items as appropriate for this PR.
GitHub Bot Help
/bot [-h] ['run', 'kill', 'skip', 'reuse-pipeline'] ...
Provide a user friendly way for developers to interact with a Jenkins server.
Run
/bot [-h|--help]
to print this help message.See details below for each supported subcommand.
run [--reuse-test (optional)pipeline-id --disable-fail-fast --skip-test --stage-list "A10-PyTorch-1, xxx" --gpu-type "A30, H100_PCIe" --test-backend "pytorch, cpp" --add-multi-gpu-test --only-multi-gpu-test --disable-multi-gpu-test --post-merge --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx" --detailed-log --debug(experimental)]
Launch build/test pipelines. All previously running jobs will be killed.
--reuse-test (optional)pipeline-id
(OPTIONAL) : Allow the new pipeline to reuse build artifacts and skip successful test stages from a specified pipeline or the last pipeline if no pipeline-id is indicated. If the Git commit ID has changed, this option will be always ignored. The DEFAULT behavior of the bot is to reuse build artifacts and successful test results from the last pipeline.--disable-reuse-test
(OPTIONAL) : Explicitly prevent the pipeline from reusing build artifacts and skipping successful test stages from a previous pipeline. Ensure that all builds and tests are run regardless of previous successes.--disable-fail-fast
(OPTIONAL) : Disable fail fast on build/tests/infra failures.--skip-test
(OPTIONAL) : Skip all test stages, but still run build stages, package stages and sanity check stages. Note: Does NOT update GitHub check status.--stage-list "A10-PyTorch-1, xxx"
(OPTIONAL) : Only run the specified test stages. Examples: "A10-PyTorch-1, xxx". Note: Does NOT update GitHub check status.--gpu-type "A30, H100_PCIe"
(OPTIONAL) : Only run the test stages on the specified GPU types. Examples: "A30, H100_PCIe". Note: Does NOT update GitHub check status.--test-backend "pytorch, cpp"
(OPTIONAL) : Skip test stages which don't match the specified backends. Only support [pytorch, cpp, tensorrt, triton]. Examples: "pytorch, cpp" (does not run test stages with tensorrt or triton backend). Note: Does NOT update GitHub pipeline status.--only-multi-gpu-test
(OPTIONAL) : Only run the multi-GPU tests. Note: Does NOT update GitHub check status.--disable-multi-gpu-test
(OPTIONAL) : Disable the multi-GPU tests. Note: Does NOT update GitHub check status.--add-multi-gpu-test
(OPTIONAL) : Force run the multi-GPU tests in addition to running L0 pre-merge pipeline.--post-merge
(OPTIONAL) : Run the L0 post-merge pipeline instead of the ordinary L0 pre-merge pipeline.--extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx"
(OPTIONAL) : Run the ordinary L0 pre-merge pipeline and specified test stages. Examples: --extra-stage "H100_PCIe-TensorRT-Post-Merge-1, xxx".--detailed-log
(OPTIONAL) : Enable flushing out all logs to the Jenkins console. This will significantly increase the log volume and may slow down the job.--debug
(OPTIONAL) : Experimental feature. Enable access to the CI container for debugging purpose. Note: Specify exactly one stage in thestage-list
parameter to access the appropriate container environment. Note: Does NOT update GitHub check status.For guidance on mapping tests to stage names, see
docs/source/reference/ci-overview.md
and the
scripts/test_to_stage_mapping.py
helper.kill
kill
Kill all running builds associated with pull request.
skip
skip --comment COMMENT
Skip testing for latest commit on pull request.
--comment "Reason for skipping build/test"
is required. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.reuse-pipeline
reuse-pipeline
Reuse a previous pipeline to validate current commit. This action will also kill all currently running builds associated with the pull request. IMPORTANT NOTE: This is dangerous since lack of user care and validation can cause top of tree to break.
Summary by CodeRabbit