[None][chroe] Mass integration of release/1.2 - 2nd#11088
[None][chroe] Mass integration of release/1.2 - 2nd#11088chzblych merged 21 commits intoNVIDIA:mainfrom
Conversation
ae96ae9 to
b270dcc
Compare
📝 WalkthroughWalkthroughChanges span multiple domains: removing mutex protection from KVCache descendant freeing, adjusting AllReduce strategy fallbacks, adding LoRA-awareness to Llama and attention modules to bypass quantization, updating speculative decoding interfaces with MLA flags, propagating mRoPE handles in disaggregated mode, and adjusting test configurations and test lists. Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes 🚥 Pre-merge checks | ❌ 3❌ Failed checks (1 warning, 2 inconclusive)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
b270dcc to
a86de0e
Compare
✨ Finishing touches
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.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (11)
tests/unittest/_torch/speculative/test_dynamic_spec_decode.py (1)
1-3: Add the NVIDIA copyright header (latest year).This .py file should include the standard NVIDIA copyright header with the year of the latest meaningful modification (2026). Please align it with the format used elsewhere in the repo.
As per coding guidelines, all TensorRT-LLM source files (.py) should contain an NVIDIA copyright header with the year of latest meaningful modification.tensorrt_llm/llmapi/utils.py (1)
1-1: Add the NVIDIA copyright header.This source file is missing the required NVIDIA copyright header for the latest meaningful modification year (2026). Please add the standard header used in this repo at the top of the file.
As per coding guidelines: All TensorRT-LLM source files (.cpp, .h, .cu, .py, and other source files) should contain an NVIDIA copyright header with the year of latest meaningful modification.tests/integration/defs/examples/serve/test_serve.py (1)
1-1: Add the NVIDIA copyright header for this modified source file.The file is missing the required NVIDIA header with the latest modification year (2026). Please add the standard header used across the repo.
As per coding guidelines: All TensorRT-LLM source files (.cpp, .h, .cu, .py, and other source files) should contain an NVIDIA copyright header with the year of latest meaningful modification.
tensorrt_llm/_torch/pyexecutor/py_executor_creator.py (1)
1-1: Add the standard NVIDIA copyright header (year 2026).This file lacks the required NVIDIA header. Please add the repo-standard header with the latest meaningful modification year (2026) at the top of the file.
🧾 Proposed header placement (use repo-standard wording)
+# +# Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. +# SPDX-License-Identifier: Apache-2.0 +# import copyAs per coding guidelines: "All TensorRT-LLM source files (.cpp, .h, .cu, .py, and other source files) should contain an NVIDIA copyright header with the year of latest meaningful modification."
cpp/tensorrt_llm/kernels/tinygemm2/tinygemm2_kernel.cuh (2)
1-3: Update the copyright year to 2026.The file was modified in 2026, but the header still lists 2025 as the latest year. As per coding guidelines, All TensorRT-LLM source files (.cpp, .h, .cu, .py, and other source files) should contain an NVIDIA copyright header with the year of latest meaningful modification.
411-446: MovecudaTriggerProgrammaticLaunchCompletion()after epilogue writes and final synchronization.The completion trigger at line 413 is called before warp 0 writes to
outputandprofilebuffers, violating proper ordering semantics. Even though the trigger itself does not enforce memory visibility, all writes must be logically complete before signaling kernel completion to dependent launches. Move the call below the final__syncthreads()and gate it to a single thread for clarity and correctness.Reordering to move completion after writes
- cudaTriggerProgrammaticLaunchCompletion(); - if (warp_id == 0) { ... if (PROFILE && blockIdx.y == 0 && threadIdx.x == 0) profile[blockIdx.x].complete = gclock64(); } __syncthreads(); + if (threadIdx.x == 0) + { + cudaTriggerProgrammaticLaunchCompletion(); + }cpp/tensorrt_llm/common/customAllReduceUtils.h (1)
110-118: Stale comment: update to match the actual fallback behavior.The comment on line 110 still references
NCCL_SYMMETRICas the fallback, but the code now returnsNCCL. This inconsistency could confuse future maintainers.📝 Proposed fix
- // Check if the entry is out of bounds, otherwise return NCCL_SYMMETRIC as fallback + // Check if the entry is out of bounds, otherwise return NCCL as fallback if (AllReduceBestStrategyTable.find(sm_version) == AllReduceBestStrategyTable.end()tensorrt_llm/_torch/models/modeling_llama.py (2)
1-1: Add the NVIDIA copyright header (2026).The file starts with imports and is missing the required NVIDIA copyright header. Please insert the standard repo header with the latest modification year before any code.
As per coding guidelines, All TensorRT-LLM source files (.cpp, .h, .cu, .py, and other source files) should contain an NVIDIA copyright header with the year of latest meaningful modification.
780-815: LoRA+NVFP4/FP8 still quantizes when PRE_MLP_FUSION is off.The LoRA bypass only applies to the fused path. When PRE_MLP_FUSION is false (e.g., TP=1 or fusion disabled), the non-fusion RMSNorm still sets
nvfp4_scale, so LoRA grouped_gemm can still see quantized inputs. Please gate the non‑fusion path with the samehas_loracheck (or route through a non‑quantizing RMSNorm) so LoRA is safe in all configs.🛠️ Suggested guard for the non‑fusion path
- if self.PRE_MLP_FUSION: - has_lora = bool(kwargs.get('lora_params')) + has_lora = bool(kwargs.get('lora_params')) + if self.PRE_MLP_FUSION: ... else: - if self.is_nvfp4: - self.post_attention_layernorm.nvfp4_scale = self.mlp.gate_up_proj.input_scale + if self.is_nvfp4 and not has_lora: + self.post_attention_layernorm.nvfp4_scale = self.mlp.gate_up_proj.input_scale + elif self.is_nvfp4: + self.post_attention_layernorm.nvfp4_scale = None hidden_states, residual = self.post_attention_layernorm( hidden_states, residual)tensorrt_llm/_torch/pyexecutor/model_engine.py (1)
1-1: Add the NVIDIA copyright header (2026).The file starts with imports and is missing the required NVIDIA copyright header. Please insert the standard repo header with the latest modification year before any code.
As per coding guidelines, All TensorRT-LLM source files (.cpp, .h, .cu, .py, and other source files) should contain an NVIDIA copyright header with the year of latest meaningful modification.
tensorrt_llm/_torch/modules/attention.py (1)
99-132:attn_custom_op_inplacedoes not propagatehas_lora, breaking quantization bypass when torch compile is used with LoRA.The custom op called during torch compilation (line 521) does not pass
has_lorato_attn_impl. When LoRA is active in a torch-compiled model, this causes the quantization bypass logic at line 451 to fail—_attn_implreceives the defaulthas_lora=False, enabling FP8 quantization despite LoRA grouped_gemm not supporting it. This breaks the quantization handling that is correctly applied in the non-compiled path (line 541).Add
has_loraas a parameter toattn_custom_op_inplaceand propagate it fromforward_impl(which receives it at line 504).
🤖 Fix all issues with AI agents
In `@tensorrt_llm/_torch/pyexecutor/model_engine.py`:
- Around line 53-54: Replace the direct-from import of Eagle3 symbols with a
namespaced module import: change "from ..speculative.eagle3 import
Eagle3ResourceManager, Eagle3SpecMetadata" to "from ..speculative import
eagle3", then update all usages to reference the namespaced classes: replace
Eagle3ResourceManager occurrences with eagle3.Eagle3ResourceManager (at the
sites currently using it) and replace Eagle3SpecMetadata occurrences with
eagle3.Eagle3SpecMetadata (update all six checks/uses named in the review).
In `@tests/integration/test_lists/waives.txt`:
- Line 302: Remove the duplicate waive entries by keeping one occurrence of each
test and deleting their second occurrences: remove the duplicate lines for
examples/test_ray.py::test_llm_inference_distributed_ray[tp2pp2],
llmapi/test_llm_examples.py::test_llmapi_tensorrt_engine, and
accuracy/test_llm_api_pytorch.py::TestLlama4ScoutInstruct::test_fp4[tp4-cuda_graph=True]
so each test ID appears only once in the waive list.
In `@tests/unittest/llmapi/test_llm_pytorch.py`:
- Around line 632-634: Add the missing pytest partition marker above the test
function test_llama_3_3_70b_fp8_with_squad_lora_tp2 by inserting the same style
marker used by the other LoRA tests in this file (e.g., `@pytest.mark.part1` or
the partition number used by nearby LoRA tests) so the test is included in the
correct CI partition; place the decorator directly above the
`@skip_gpu_memory_less_than_80gb/`@skip_ray decorators for the function
test_llama_3_3_70b_fp8_with_squad_lora_tp2.
🧹 Nitpick comments (8)
cpp/tensorrt_llm/kernels/quantization.cuh (2)
1-2: Consider updating the copyright year.The copyright header shows 2019-2023, but this PR includes modifications dated 2026. As per coding guidelines, the copyright header should reflect the year of the latest meaningful modification.
📅 Proposed copyright year update
/* - * Copyright (c) 2019-2023, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2019-2026, NVIDIA CORPORATION. All rights reserved. *
781-781: Minor: Add punctuation and consider clarifying the term "ACKBULK".The comment should end with proper punctuation as per coding guidelines for full-sentence comments. Additionally, the term "ACKBULK" may not be immediately clear to future maintainers—consider briefly explaining what it refers to or providing a reference if it's project-specific terminology.
✏️ Suggested improvement
- // This value is prepared by model, no need to be protected by ACKBULK + // This value is prepared by model, no need to be protected by ACKBULK.Or with additional clarity:
- // This value is prepared by model, no need to be protected by ACKBULK + // This value is prepared by the model; no ACKBULK protection is needed.tests/integration/defs/disaggregated/test_auto_scaling.py (1)
464-469: Avoid unnecessary GPU overlap during worker restart.At Line 468,
gen_worker2is started on device 0 whilectx_worker1is still on device 0, even though device 1 was just freed. This adds avoidable contention and can introduce flakiness. Consider reusing the freed device forgen_worker2and then placingctx_worker2on the other GPU oncectx_worker1is terminated.🔧 Proposed adjustment
- gen_worker2 = run_gen_worker(model_name, - worker_config, - work_dir, - port=0, - device=0) + gen_worker2 = run_gen_worker(model_name, + worker_config, + work_dir, + port=0, + device=1) @@ - ctx_worker2 = run_ctx_worker(model_name, - worker_config, - work_dir, - port=0, - device=1) + ctx_worker2 = run_ctx_worker(model_name, + worker_config, + work_dir, + port=0, + device=0)Also applies to: 486-490
tensorrt_llm/llmapi/utils.py (1)
18-37: Preserve the module namespace when importingfunctools.Guidelines require module-level imports even for single symbols. Switch to
import functoolsand use@functools.wraps.
As per coding guidelines: Always maintain the namespace when importing Python modules, even if only one class or function from a module is used.♻️ Proposed refactor
-from functools import wraps +import functools @@ - `@wraps`(func) + `@functools.wraps`(func) def wrapper(*args, **kwargs):tests/unittest/_torch/speculative/test_draft_len_schedule.py (1)
18-22: LGTM! Fixture pattern is consistent with other speculative tests.The change from module-scoped autouse to function-scoped with explicit
monkeypatchis a good improvement—it provides better test isolation and automatic cleanup. Consider extracting this fixture totests/unittest/_torch/speculative/conftest.pysince identical definitions exist intest_dynamic_spec_decode.py,test_eagle3.py, andtest_spec_gate.py.tests/unittest/llmapi/test_llm_pytorch.py (1)
659-663: Use f-string conversion flag forrepr().Per static analysis (RUF010), prefer
!rconversion flag overrepr()calls in f-strings.Suggested fix
- print(f"Generated output: {repr(generated_text)}") + print(f"Generated output: {generated_text!r}") similarity = similarity_score(generated_text, expected_output) assert similar(generated_text, expected_output, threshold=0.8), \ - f"Output similarity too low (similarity={similarity:.2%})!\nExpected: {repr(expected_output)}\nGot: {repr(generated_text)}" + f"Output similarity too low (similarity={similarity:.2%})!\nExpected: {expected_output!r}\nGot: {generated_text!r}"tests/integration/defs/examples/serve/test_serve.py (1)
7-12: Keep the module namespace for the new defs.common import.This addition breaks the “namespace imports only” rule. Prefer importing the module and calling through its namespace.
♻️ Suggested update
-from defs.common import get_free_port_in_ci +import defs.common as common ... - port = get_free_port_in_ci() + port = common.get_free_port_in_ci() ... - port = get_free_port_in_ci() + port = common.get_free_port_in_ci()As per coding guidelines: Always maintain the namespace when importing Python modules, even if only one class or function from a module is used.
tests/unittest/_torch/multimodal/test_mm_encoder_standalone.py (1)
287-337: Well-structured P/D disaggregation test.The test correctly validates the disaggregated inference flow:
- Generates reference output with full inference
- Performs prefill with
context_onlyandmax_tokens=0- Performs decode with
generation_onlyusing the disaggregated params- Compares outputs for equivalence
Note: The static analysis warnings about unused
model_dirandpd_disaggarguments are false positives - these parameters are used indirectly through pytest fixture parameterization (indirect=True).Consider adding
strict=Trueto thezip()calls on lines 330 and 334 to catch potential length mismatches early (Python 3.10+):- for i, (ref_output, test_output) in enumerate(zip(outputs_ref, outputs_pd)): + for i, (ref_output, test_output) in enumerate(zip(outputs_ref, outputs_pd, strict=True)):,
a86de0e to
e20eae1
Compare
yihwang-nv
left a comment
There was a problem hiding this comment.
Thanks, LGTM! The PR #10871 can be ignored.
|
/bot run --disable-fail-fast |
|
PR_Github #34006 [ run ] triggered by Bot. Commit: |
213e05b to
944bf56
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #34028 [ run ] triggered by Bot. Commit: |
|
/bot kill |
944bf56 to
ffc0caf
Compare
|
PR_Github #34030 [ kill ] triggered by Bot. Commit: |
|
PR_Github #34030 [ kill ] completed with state |
…ts (NVIDIA#10855) Signed-off-by: Pengbo Wang <221450789+pengbowang-nv@users.noreply.github.com> Signed-off-by: Wangshanshan <30051912+dominicshanshan@users.noreply.github.com>
… mrope (NVIDIA#10865) * Why? Commit a6a8898 enabled EPD disaggregation for VLMs that use mrope (e.g. qwen). However, this broke PD disaggregation for these sames models. * What? This commit fixes this, and adds a unit test that guards against it. Signed-off-by: William Zhang <133824995+2ez4bz@users.noreply.github.com> Signed-off-by: Wangshanshan <30051912+dominicshanshan@users.noreply.github.com>
…3-70B-fp8 (NVIDIA#9808) Signed-off-by: Michal Guzek <mguzek@nvidia.com> Signed-off-by: Michal Guzek <moraxu@users.noreply.github.com> Signed-off-by: Jin Li <59594262+liji-nv@users.noreply.github.com> Co-authored-by: Jin Li <59594262+liji-nv@users.noreply.github.com> Signed-off-by: Wangshanshan <30051912+dominicshanshan@users.noreply.github.com>
…ew requests, cherry-pick 10665 (NVIDIA#10817) Signed-off-by: Lizhi Zhou <1432185+reasonsolo@users.noreply.github.com> Signed-off-by: Wangshanshan <30051912+dominicshanshan@users.noreply.github.com>
6d3e332 to
9a5a92a
Compare
…on Hopper (NVIDIA#10729) (NVIDIA#10850) Signed-off-by: Fridah-nv <201670829+Fridah-nv@users.noreply.github.com> Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com> Co-authored-by: Frida Hou <201670829+Fridah-nv@users.noreply.github.com> Signed-off-by: Wangshanshan <30051912+dominicshanshan@users.noreply.github.com>
…y test (NVIDIA#10461) (NVIDIA#10851) Signed-off-by: Lucas Liebenwein <11156568+lucaslie@users.noreply.github.com> Signed-off-by: Wangshanshan <30051912+dominicshanshan@users.noreply.github.com>
Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com> Signed-off-by: Wangshanshan <30051912+dominicshanshan@users.noreply.github.com>
Signed-off-by: Yuxian Qiu <142763828+yuxianq@users.noreply.github.com> Signed-off-by: Wangshanshan <30051912+dominicshanshan@users.noreply.github.com>
…A#10904) Signed-off-by: Enwei Zhu <21126786+syuoni@users.noreply.github.com> Signed-off-by: Wangshanshan <30051912+dominicshanshan@users.noreply.github.com>
…tability for unit tests using single process mode (NVIDIA#10730) Signed-off-by: Zheyu Fu <zheyuf@NVIDIA.com> Signed-off-by: Wangshanshan <30051912+dominicshanshan@users.noreply.github.com>
… to insufficient memory (NVIDIA#10928) Signed-off-by: Yukun He <23156053+hyukn@users.noreply.github.com> Signed-off-by: Wangshanshan <30051912+dominicshanshan@users.noreply.github.com>
Signed-off-by: Ivy Zhang <25222398+crazydemo@users.noreply.github.com> Signed-off-by: Wangshanshan <30051912+dominicshanshan@users.noreply.github.com>
…kstart_advanced[GPT-OSS-120B-gpt_oss/gpt-oss-120b] (NVIDIA#10952) Signed-off-by: Yihan Wang <yihwang@nvidia.com> Signed-off-by: Wangshanshan <30051912+dominicshanshan@users.noreply.github.com>
Signed-off-by: Mike Iovine <6158008+mikeiovine@users.noreply.github.com> Signed-off-by: Wangshanshan <30051912+dominicshanshan@users.noreply.github.com>
Signed-off-by: Mike Iovine <6158008+mikeiovine@users.noreply.github.com> Signed-off-by: Wangshanshan <30051912+dominicshanshan@users.noreply.github.com>
9a5a92a to
22d93e2
Compare
|
/bot run --stage-list "" |
|
PR_Github #34414 [ run ] triggered by Bot. Commit: |
|
PR_Github #34414 [ run ] completed with state |
|
/bot skip ---comment "Passed LLM/main/L0_MergeRequest_PR pipeline #26388 and the follow-up rebase was for resolving a test waive list conflict" |
GitHub Bot Help
Provide a user friendly way for developers to interact with a Jenkins server. Run See details below for each supported subcommand. Details
Launch build/test pipelines. All previously running jobs will be killed.
kill
Kill all running builds associated with pull request. skip
Skip testing for latest commit on pull request. 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. |
|
/bot skip --comment "Passed LLM/main/L0_MergeRequest_PR pipeline #26388 and the follow-up rebase was for resolving a test waive list conflict" |
|
PR_Github #34430 [ skip ] triggered by Bot. Commit: |
|
PR_Github #34430 [ skip ] completed with state |
Description
This is weekly Mass Integration (MI) for release/1.2. Follow PR will not cherry back to main:
#10871 @yihwang-nv
#10836 (already in main)
and two infra PR with title: [None][infra] Check in most recent lock file from nightly pipeline
Test Coverage
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
Update tava architecture diagram if there is a significant design change in PR.
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.
Details
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-listparameter 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.mdand the
scripts/test_to_stage_mapping.pyhelper.kill
killKill all running builds associated with pull request.
skip
skip --comment COMMENTSkip 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-pipelineReuse 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.