Skip to content

Comments

[https://nvbugs/5791936][fix] Add warning for gen-only paused#10664

Merged
chuangz0 merged 2 commits intoNVIDIA:mainfrom
chuangz0:fix_gen_only_pause
Jan 16, 2026
Merged

[https://nvbugs/5791936][fix] Add warning for gen-only paused#10664
chuangz0 merged 2 commits intoNVIDIA:mainfrom
chuangz0:fix_gen_only_pause

Conversation

@chuangz0
Copy link
Collaborator

@chuangz0 chuangz0 commented Jan 14, 2026

Summary by CodeRabbit

  • Improvements
    • Added diagnostic warning message when pausing generation-only requests, alerting users that this action may impact performance.

✏️ Tip: You can customize this high-level summary in your review settings.

Description

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 the stage-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.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Jan 14, 2026

📝 Walkthrough

Walkthrough

A warning log is added to the GenericLlmRequest::pause method when pausing a GENERATION_ONLY request type, alerting that this operation may degrade performance by rescheduling into a context-init state.

Changes

Cohort / File(s) Summary
Logging Enhancement
cpp/include/tensorrt_llm/batch_manager/llmRequest.h
Added warning log in GenericLlmRequest::pause when pausing GENERATION_ONLY requests to inform users of potential performance degradation from rescheduling into context-init state.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is a blank template with no actual content filled in the Description or Test Coverage sections, making it impossible to understand the issue, solution, or test strategy. Fill in the Description section explaining the issue and why the warning was added, and document relevant test coverage or test verification approach.
✅ Passed checks (2 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.
Title check ✅ Passed The PR title references an internal bug tracking link and describes adding a warning for gen-only paused requests, which aligns with the changeset that adds a warning log for pausing generation-only requests.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@cpp/include/tensorrt_llm/batch_manager/llmRequest.h`:
- Around line 842-854: The comment and warning text around the generation-only
branch need grammar and formatting fixes: update the comment sentences to start
with capitals, fix "Have no ideal" → "Have no idea", remove the misplaced period
before "and", and change "we just issue" → "We just issue"; update the
TLLM_LOG_WARNING message to read something like "Pausing generation-only
request, request_id: %lu, changes it to context init state, which may degrade
performance" (use mLlmRequestType /
LlmRequestType::LLMREQUEST_TYPE_GENERATION_ONLY branch and mRequestId in the
format string) so spacing, hyphenation, and phrasing are corrected while keeping
the same logging call (TLLM_LOG_WARNING).
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 287f6c2 and 93831b3.

📒 Files selected for processing (1)
  • cpp/include/tensorrt_llm/batch_manager/llmRequest.h
🧰 Additional context used
📓 Path-based instructions (4)
**/*.{cpp,cc,cxx,h,hpp,hxx,cu,cuh}

📄 CodeRabbit inference engine (CODING_GUIDELINES.md)

**/*.{cpp,cc,cxx,h,hpp,hxx,cu,cuh}: Closing braces of namespaces should have a comment saying the namespace it closes (e.g., } // namespace foo)
Prefer const or constexpr variables over #defines whenever possible
A variable that is not modified after its initialization should be declared as const
For naming of constants in C++, use uppercase snakecase with prefix 'k' (e.g., kDIGIT_NUM)
Except for 0, nullptr, true, and false, all other literals should only be used for variable initialization and not in comparisons or expressions
Use Allman indentation style for brace notation in C++ code
Put the semicolon for an empty for or while loop in a new line
The statement forming the body of a switch, while, do..while, or for statement must be a compound statement (use brace-delimited statements)
If and else statements should always be followed by brace-delimited statements, even if empty or a single statement
C++ filenames should use camelCase with first letter lowercase (e.g., thisIsAFilename.cpp)
All types (including class names) in C++ should use PascalCase with uppercase first letter (e.g., FooBarClass)
Local variables, methods, and namespaces in C++ should use camelCase with first letter lowercase (e.g., localFooBar)
Non-magic-number global variables that are non-static and not defined in anonymous namespace should use camelCase prefixed with 'g' (e.g., gDontUseGlobalFoos)
Non-magic-number global variables that are static or defined in an anonymous namespace should use camelCase prefixed with 's' (e.g., sMutableStaticGlobal)
Locally visible static variables should use camelCase with 's' as the first letter (e.g., static std::once_flag sFlag;)
Public, private, and protected class member variables should use camelCase prefixed with 'm' (e.g., mNbFooValues)
Do not use Hungarian notation in C++ except for 'apps hungarian' (e.g., 'nb' to indicate count: mNbLayers)
If a constructor parameter name conflicts with a public me...

Files:

  • cpp/include/tensorrt_llm/batch_manager/llmRequest.h
**/*.{h,hpp,hxx}

📄 CodeRabbit inference engine (CODING_GUIDELINES.md)

**/*.{h,hpp,hxx}: Follow Doxygen rules for documenting new C++ class interfaces and function prototypes. Use //! for C++-style single-line comments and //!< for class members
Use a preprocessor guard in C++ header files with the format TRTLLM_<FILENAME>_H, where the filename is in uppercase with no underscores, no prefix underscores, and no trailing underscores

Files:

  • cpp/include/tensorrt_llm/batch_manager/llmRequest.h
**/*.{h,hpp,hxx,cpp,cc,cxx,cu,cuh}

📄 CodeRabbit inference engine (CODING_GUIDELINES.md)

All C++ class templates, function templates, class template member functions, and class template static members must be instantiated at least once

Files:

  • cpp/include/tensorrt_llm/batch_manager/llmRequest.h
**/*.{cpp,cc,cxx,h,hpp,hxx,cu,cuh,py}

📄 CodeRabbit inference engine (CODING_GUIDELINES.md)

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

Files:

  • cpp/include/tensorrt_llm/batch_manager/llmRequest.h
🧠 Learnings (3)
📚 Learning: 2025-08-20T06:56:02.889Z
Learnt from: eopXD
Repo: NVIDIA/TensorRT-LLM PR: 6768
File: cpp/tensorrt_llm/batch_manager/kvCacheManager.cpp:577-579
Timestamp: 2025-08-20T06:56:02.889Z
Learning: In cpp/tensorrt_llm/batch_manager/kvCacheManager.cpp, maxSequenceLength is now enforced as a non-optional argument in the BlockManager constructor, so concerns about std::nullopt defaulting to 0 are not applicable. When windowSize > maxSequenceLength, a warning should be added instead of handling optional parameter cases.

Applied to files:

  • cpp/include/tensorrt_llm/batch_manager/llmRequest.h
📚 Learning: 2025-08-21T09:41:49.347Z
Learnt from: eopXD
Repo: NVIDIA/TensorRT-LLM PR: 6768
File: cpp/tensorrt_llm/batch_manager/kvCacheManager.cpp:2010-2045
Timestamp: 2025-08-21T09:41:49.347Z
Learning: In cpp/tensorrt_llm/batch_manager/kvCacheManager.cpp, updateSequenceCacheBlockOffsets is specifically for updating bookkeeping when blocks are added during the context phase, not for refreshing offsets after detach operations. During detach operations, GenerationRequest::removeFrontBlock handles the necessary cache block bookkeeping internally.

Applied to files:

  • cpp/include/tensorrt_llm/batch_manager/llmRequest.h
📚 Learning: 2025-08-20T06:48:45.368Z
Learnt from: eopXD
Repo: NVIDIA/TensorRT-LLM PR: 6768
File: cpp/include/tensorrt_llm/batch_manager/kvCacheManager.h:0-0
Timestamp: 2025-08-20T06:48:45.368Z
Learning: In cpp/tensorrt_llm/batch_manager/kvCacheManager.cpp, updateSequenceCacheBlockOffsets is only called when adding a sequence, not during detach operations. During detach, the cache block bookkeeping is handled by GenerationRequest::removeFrontBlock.

Applied to files:

  • cpp/include/tensorrt_llm/batch_manager/llmRequest.h
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Pre-commit Check

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

@chuangz0
Copy link
Collaborator Author

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #31943 [ run ] triggered by Bot. Commit: 93831b3

@chuangz0 chuangz0 requested a review from Shixiaowei02 January 14, 2026 09:43
@tensorrt-cicd
Copy link
Collaborator

PR_Github #31943 [ run ] completed with state FAILURE. Commit: 93831b3
/LLM/main/L0_MergeRequest_PR pipeline #24742 completed with status: 'FAILURE'

⚠️ Action Required:

  • Please check the failed tests and fix your PR
  • If you cannot view the failures, ask the CI triggerer to share details
  • Once fixed, request an NVIDIA team member to trigger CI again

Signed-off-by: Chuang Zhu <111838961+chuangz0@users.noreply.github.com>
Signed-off-by: Chuang Zhu <111838961+chuangz0@users.noreply.github.com>
@chuangz0 chuangz0 changed the title [https://nvbugs/5791936][fix] add warning for gen only paused [https://nvbugs/5791936][fix] Add warning for gen only paused Jan 15, 2026
@chuangz0 chuangz0 changed the title [https://nvbugs/5791936][fix] Add warning for gen only paused [https://nvbugs/5791936][fix] Add warning for gen only paused Jan 15, 2026
@chuangz0 chuangz0 changed the title [https://nvbugs/5791936][fix] Add warning for gen only paused [https://nvbugs/5791936][fix] Add warning for gen_only paused Jan 15, 2026
@chuangz0 chuangz0 changed the title [https://nvbugs/5791936][fix] Add warning for gen_only paused [https://nvbugs/5791936][fix] Add warning for gen-only paused Jan 15, 2026
@chuangz0 chuangz0 changed the title [https://nvbugs/5791936][fix] Add warning for gen-only paused [https://nvbugs/5791936][fix] Add warning for gen-only paused Jan 15, 2026
@chuangz0
Copy link
Collaborator Author

/bot run

@chuangz0
Copy link
Collaborator Author

/bot skip --comment "just add a warnning"

@tensorrt-cicd
Copy link
Collaborator

PR_Github #32212 [ skip ] triggered by Bot. Commit: 021f5c1

@chuangz0 chuangz0 enabled auto-merge (squash) January 16, 2026 02:53
@tensorrt-cicd
Copy link
Collaborator

PR_Github #32212 [ skip ] completed with state SUCCESS. Commit: 021f5c1
Skipping testing for commit 021f5c1

@chuangz0 chuangz0 merged commit 8257b67 into NVIDIA:main Jan 16, 2026
10 of 15 checks passed
zheyuf pushed a commit to zheyuf/TensorRT-LLM that referenced this pull request Jan 29, 2026
…#10664)

Signed-off-by: Chuang Zhu <111838961+chuangz0@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants