-
Notifications
You must be signed in to change notification settings - Fork 2k
[https://nvbugs/5715568][fix] Force to release torch memory when LLM is destroyed #10314
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
Conversation
|
/bot run --stage-list "GB200-8_GPUs-2_Nodes-PyTorch-1,GB200-4_GPUs-PyTorch-2" |
📝 WalkthroughWalkthroughThis PR adds runtime diagnostics and debug logging across shutdown methods and lifecycle events in executor, LLM API, and test infrastructure components. Changes include printing process IDs, stack traces, and diagnostic banners without modifying control flow. Test infrastructure updates add memory monitoring utilities and test parameterization. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Pre-merge checks and finishing touches❌ Failed checks (3 warnings)
✨ 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 7
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
tensorrt_llm/executor/rpc_worker.py (1)
101-107: Fix undefinedosinRpcWorker.shutdown
shutdownprints the PID viaos.getpid(), but this module never importsos, so callingshutdown()will raiseNameError.Proposed patch
-from pathlib import Path -from queue import Queue -from threading import Event -from typing import Optional, Union - -import nvtx +from pathlib import Path +from queue import Queue +from threading import Event +from typing import Optional, Union + +import os +import nvtx @@ def shutdown(self): logger_debug(f"[worker] RpcWorker #{mpi_rank()} is shutting down", color="yellow") self.shutdown_event.set() - print( - f"====================== shutdown in RpcWorker is called pid: {os.getpid()}" - ) + print( + f"====================== shutdown in RpcWorker is called pid: {os.getpid()}" + )tests/integration/defs/accuracy/test_llm_api_pytorch.py (1)
1418-1444: Remove commented-out diagnostic code and fix f-string usage.This section contains:
- Commented-out code (lines 1419, 1436, 1442-1444) that should be removed
- f-strings without placeholders (lines 1420, 1433, 1437, 1440) that should use regular strings
- Inconsistent diagnostic prints - some are active, some are commented out
As per the coding guidelines: "Avoid using... commented-out code" and static analysis correctly flags the unnecessary f-string prefixes.
🔎 Proposed cleanup
- #time.sleep(5) - print(f"================= print mem before testing") - print_device_memory() + # Remove commented-out diagnostic code or make it conditionalFor active diagnostic prints, fix f-strings:
- print(f"================= print mem after testing") + print("================= print mem after testing") print_device_memory() - #time.sleep(5) - print(f"================= print mem after testing outside") - print_device_memory() - - print(f"++++++++++++++++++++++++++++++++++++++++\n\n\n") - - #time.sleep(60) - #print(f"================= print mem after 60s") - #print_device_memory() + # Remove or make conditional as suggested in previous comment
🧹 Nitpick comments (10)
tensorrt_llm/commands/serve.py (1)
47-49: Consider using consistent logging approach throughout the signal handler.This
print()statement is inconsistent with thelogger.info()calls used throughout the rest of this signal handler (lines 53-54, 61-62, 68-69, 73-74, 77-78).The comment on line 52 mentions "Using print for safety in signal handlers," but if
logger.info()is acceptable for the existing logging statements, consider using it here as well for consistency. Alternatively, if signal safety is a genuine concern, all logging in this handler should useprint().🔎 Suggested fix for consistency
- print( - f"================================================ server received signal {signal.Signals(signum).name}" - ) + logger.info( + f"Server received signal {signal.Signals(signum).name}. Initiating cleanup." + )tensorrt_llm/_torch/pyexecutor/py_executor_creator.py (1)
224-227: Remove commented-out debug prints or convert to gated loggingThe commented
import/traceback.print_stack()lines increate_py_executorlook like temporary debugging artifacts. Either remove them, or if you still need this information, reintroduce it vialogger/logger_debugand gate it behind an env flag orenable_llm_debug().tensorrt_llm/_torch/pyexecutor/py_executor.py (1)
451-460: Gate shutdown stack/ PID diagnostics behind debug controls
PyExecutor.shutdown()now always prints a full stack trace and PID to stdout. That’s useful for debugging but very noisy in normal runs, especially since this path is hit on every executor teardown. Consider:
- Using
logger/logger_debuginstead of baretraceback.print_stack().- Gating these diagnostics behind
enable_llm_debug()or a dedicated env flag so production users don’t get unexpected console spam.tensorrt_llm/executor/base_worker.py (1)
640-641: Route worker shutdown banner through logger or debug flag
BaseWorker.shutdown()now unconditionally prints a banner to stdout. For consistency with the rest of the executor stack and to avoid polluting user stdout (especially sinceshutdown()can be called from__del__), consider switching this tologger.debug/logger.info(orlogger_debug) and/or gating it behind a debug flag.tensorrt_llm/executor/proxy.py (1)
293-295: Avoid unconditional stdout prints inGenerationExecutorProxy.shutdownThe shutdown path now prints PID banners to stdout at both the beginning and end. This is helpful when debugging but can be quite noisy for normal users and in multi-process setups.
Consider:
- Replacing these with
logger_debug/logger.infomessages, or- Wrapping them in a debug check (e.g.,
enable_llm_debug()or an env flag),so that default behavior relies on the existing logging/tracing stack instead of raw
Also applies to: 331-333
tensorrt_llm/executor/rpc/rpc_server.py (1)
137-139: Use logger for RPCServer shutdown diagnostics instead of bare print
RPCServer.shutdown()now prints a banner withis_remote_calldirectly to stdout. Since this class already useslogger_debug, and shutdown can be triggered frequently (including via remote calls), it would be cleaner to:
- Log this via
logger_debug(orlogger.info) with the same message, and/or- Guard the extra logging behind a debug flag.
That keeps diagnostics while avoiding unconditional stdout noise.
tensorrt_llm/executor/ray_executor.py (1)
296-299: Prefer logger-based shutdown diagnostics inRayExecutor.shutdownThe Ray executor now prints the PID directly in
shutdown(). Since you already log"Shutting down RayExecutor"vialogger_debug, consider folding the PID into that log (or another logger call) and/or guarding it behind a debug flag instead of usingtensorrt_llm/llmapi/mpi_session.py (1)
162-167: Consider simplifying diagnostic prints (f-strings without interpolation)Both
MpiPoolSession.shutdownandMpiCommSession.shutdownadd plain banner prints using f-strings but without any placeholders. This is harmless but trips Ruff’s F541 and is slightly noisy.If you want to keep linters quiet while retaining the diagnostics, you can drop the
fprefix:print("==================================== shutdown MPI pool session") ... print("==================================== shutdown is called MPI comm session")Also applies to: 238-249
tensorrt_llm/llmapi/llm.py (1)
175-178: Diagnostics are very verbose and repeatedly importos/tracebackThese additions provide helpful visibility (PID and stack traces) around LLM lifecycle and shutdown, but a few caveats:
shutdown,_shutdown_wrapper,__exit__, and__del__will now always print stack traces and banners, which can be quite noisy in normal usage and in libraries embedded in larger apps.os(andtraceback) are re-imported inside methods even thoughosis already imported at module level; this is harmless but unnecessary.If these are primarily for debugging OOM or CI issues, consider:
- Guarding them behind an env flag or
enable_llm_debug()-style switch.- Reusing the module-level
osimport and a singleimport tracebackat top of file.Also applies to: 821-829, 854-859, 871-876, 883-886
tensorrt_llm/executor/rpc_proxy.py (1)
189-200: Shutdown debug prints may be excessively noisy
GenerationExecutorRpcProxy.shutdownnow always:
- Dumps a full stack trace, and
- Prints PID banners twice per shutdown.
Behavior is unchanged, but for regular runs this may clutter logs significantly.
If these are for targeted debugging, consider gating them behind a debug env variable or using
logger_debuginstead of unconditionaltraceback.print_stack().
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (18)
tensorrt_llm/_torch/pyexecutor/py_executor.pytensorrt_llm/_torch/pyexecutor/py_executor_creator.pytensorrt_llm/commands/serve.pytensorrt_llm/executor/base_worker.pytensorrt_llm/executor/proxy.pytensorrt_llm/executor/ray_executor.pytensorrt_llm/executor/ray_gpu_worker.pytensorrt_llm/executor/rpc/rpc_server.pytensorrt_llm/executor/rpc_proxy.pytensorrt_llm/executor/rpc_worker.pytensorrt_llm/executor/utils.pytensorrt_llm/executor/worker.pytensorrt_llm/llmapi/llm.pytensorrt_llm/llmapi/mpi_session.pytests/integration/defs/accuracy/test_llm_api_pytorch.pytests/integration/defs/conftest.pytests/integration/test_lists/test-db/l0_gb200_multi_nodes.ymltests/integration/test_lists/waives.txt
💤 Files with no reviewable changes (1)
- tests/integration/test_lists/waives.txt
🧰 Additional context used
📓 Path-based instructions (2)
**/*.py
📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
**/*.py: Code developed for TensorRT-LLM should conform to Python 3.8+
Indent Python code with 4 spaces. Do not use tabs
Always maintain the namespace when importing in Python, even if only one class or function from a module is used
Python files should use snake_case naming:some_file.py
Python classes should use PascalCase naming:class SomeClass
Python functions and methods should use snake_case naming:def my_awesome_function():
Python local variables should use snake_case naming:my_variable = ...
Python variable names that start with a number should be prefixed with 'k':k_99th_percentile = ...
Python global variables should use upper snake_case with prefix 'G':G_MY_GLOBAL = ...
Python constants should use upper snake_case naming:MY_CONSTANT = ...
Avoid shadowing variables declared in an outer scope in Python
Initialize all externally visible members of a Python class in the constructor
For Python interfaces that may be used outside a file, prefer docstrings over comments
Python comments should be reserved for code within a function, or interfaces that are local to a file
Use Google style docstrings in Python for classes and functions, which can be parsed by Sphinx
Python attributes and variables can be documented inline with type and description
Avoid using reflection in Python when functionality can be easily achieved without reflection
When using try-except blocks in Python, limit the except to the smallest set of errors possible
When using try-except blocks in Python to handle multiple possible variable types (duck-typing), keep the body of the try as small as possible, using the else block for logic
Files:
tensorrt_llm/executor/rpc_proxy.pytensorrt_llm/executor/proxy.pytensorrt_llm/executor/utils.pytensorrt_llm/executor/base_worker.pytensorrt_llm/executor/worker.pytensorrt_llm/llmapi/llm.pytensorrt_llm/commands/serve.pytensorrt_llm/_torch/pyexecutor/py_executor_creator.pytensorrt_llm/executor/rpc/rpc_server.pytensorrt_llm/_torch/pyexecutor/py_executor.pytensorrt_llm/llmapi/mpi_session.pytests/integration/defs/conftest.pytensorrt_llm/executor/ray_executor.pytensorrt_llm/executor/ray_gpu_worker.pytests/integration/defs/accuracy/test_llm_api_pytorch.pytensorrt_llm/executor/rpc_worker.py
**/*.{cpp,h,cu,cuh,py}
📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
All TensorRT-LLM Open Source Software code should contain an NVIDIA copyright header that includes the year of its latest meaningful modification
Files:
tensorrt_llm/executor/rpc_proxy.pytensorrt_llm/executor/proxy.pytensorrt_llm/executor/utils.pytensorrt_llm/executor/base_worker.pytensorrt_llm/executor/worker.pytensorrt_llm/llmapi/llm.pytensorrt_llm/commands/serve.pytensorrt_llm/_torch/pyexecutor/py_executor_creator.pytensorrt_llm/executor/rpc/rpc_server.pytensorrt_llm/_torch/pyexecutor/py_executor.pytensorrt_llm/llmapi/mpi_session.pytests/integration/defs/conftest.pytensorrt_llm/executor/ray_executor.pytensorrt_llm/executor/ray_gpu_worker.pytests/integration/defs/accuracy/test_llm_api_pytorch.pytensorrt_llm/executor/rpc_worker.py
🧠 Learnings (10)
📚 Learning: 2025-08-06T13:58:07.506Z
Learnt from: galagam
Repo: NVIDIA/TensorRT-LLM PR: 6487
File: tests/unittest/_torch/auto_deploy/unit/singlegpu/test_ad_trtllm_bench.py:1-12
Timestamp: 2025-08-06T13:58:07.506Z
Learning: In TensorRT-LLM, test files (files under tests/ directories) do not require NVIDIA copyright headers, unlike production source code files. Test files typically start directly with imports, docstrings, or code.
Applied to files:
tensorrt_llm/llmapi/llm.pytests/integration/defs/accuracy/test_llm_api_pytorch.py
📚 Learning: 2025-07-28T17:06:08.621Z
Learnt from: moraxu
Repo: NVIDIA/TensorRT-LLM PR: 6303
File: tests/integration/test_lists/qa/examples_test_list.txt:494-494
Timestamp: 2025-07-28T17:06:08.621Z
Learning: In TensorRT-LLM testing, it's common to have both CLI flow tests (test_cli_flow.py) and PyTorch API tests (test_llm_api_pytorch.py) for the same model. These serve different purposes: CLI flow tests validate the traditional command-line workflow, while PyTorch API tests validate the newer LLM API backend. Both are legitimate and should coexist.
Applied to files:
tensorrt_llm/llmapi/llm.pytests/integration/test_lists/test-db/l0_gb200_multi_nodes.ymltests/integration/defs/accuracy/test_llm_api_pytorch.py
📚 Learning: 2025-09-09T09:40:45.658Z
Learnt from: fredricz-20070104
Repo: NVIDIA/TensorRT-LLM PR: 7645
File: tests/integration/test_lists/qa/llm_function_core.txt:648-648
Timestamp: 2025-09-09T09:40:45.658Z
Learning: In TensorRT-LLM test lists, it's common and intentional for the same test to appear in multiple test list files when they serve different purposes (e.g., llm_function_core.txt for comprehensive core functionality testing and llm_function_core_sanity.txt for quick sanity checks). This duplication allows tests to be run in different testing contexts.
Applied to files:
tensorrt_llm/llmapi/llm.pytests/integration/test_lists/test-db/l0_gb200_multi_nodes.ymltests/integration/defs/accuracy/test_llm_api_pytorch.py
📚 Learning: 2025-08-19T12:45:11.997Z
Learnt from: amitz-nv
Repo: NVIDIA/TensorRT-LLM PR: 7033
File: tensorrt_llm/_torch/pyexecutor/model_engine.py:0-0
Timestamp: 2025-08-19T12:45:11.997Z
Learning: In tensorrt_llm/_torch/pyexecutor/model_engine.py, DoRA (Delta Orthogonal Rank Adaptation) functionality was removed from the PyTorch flow to eliminate issues with inverted DoRA detection logic. The original is_dora condition was checking if scaling_vec_pointer == 0, which was potentially incorrect.
Applied to files:
tensorrt_llm/_torch/pyexecutor/py_executor_creator.py
📚 Learning: 2025-12-12T03:27:08.565Z
Learnt from: tongyuantongyu
Repo: NVIDIA/TensorRT-LLM PR: 9655
File: tensorrt_llm/_torch/pyexecutor/sampler.py:3031-3031
Timestamp: 2025-12-12T03:27:08.565Z
Learning: In files under tensorrt_llm/_torch/pyexecutor, avoid accessing torch.Tensor objects inside for-loops when iterating over requests. Convert batched tensors to Python lists beforehand using tensor.tolist(), and then iterate over those lists. This improves performance by reducing tensor-bound operations inside hot loops. Apply this pattern to similar code paths that process batches to access simple Python data structures (lists) inside loops.
Applied to files:
tensorrt_llm/_torch/pyexecutor/py_executor_creator.pytensorrt_llm/_torch/pyexecutor/py_executor.py
📚 Learning: 2025-09-17T02:48:52.732Z
Learnt from: tongyuantongyu
Repo: NVIDIA/TensorRT-LLM PR: 7781
File: tests/integration/test_lists/waives.txt:313-313
Timestamp: 2025-09-17T02:48:52.732Z
Learning: In TensorRT-LLM, `tests/integration/test_lists/waives.txt` is specifically for waiving/skipping tests, while other test list files like those in `test-db/` and `qa/` directories are for different test execution contexts (pre-merge, post-merge, QA tests). The same test appearing in both waives.txt and execution list files is intentional - the test is part of test suites but will be skipped due to the waiver.
Applied to files:
tests/integration/test_lists/test-db/l0_gb200_multi_nodes.yml
📚 Learning: 2025-08-26T09:49:04.956Z
Learnt from: pengbowang-nv
Repo: NVIDIA/TensorRT-LLM PR: 7192
File: tests/integration/test_lists/test-db/l0_dgx_b200.yml:56-72
Timestamp: 2025-08-26T09:49:04.956Z
Learning: In TensorRT-LLM test configuration files, the test scheduling system handles wildcard matching with special rules that prevent duplicate test execution even when the same tests appear in multiple yaml files with overlapping GPU wildcards (e.g., "*b200*" and "*gb200*").
Applied to files:
tests/integration/test_lists/test-db/l0_gb200_multi_nodes.ymltests/integration/defs/accuracy/test_llm_api_pytorch.py
📚 Learning: 2025-08-13T11:07:11.772Z
Learnt from: Funatiq
Repo: NVIDIA/TensorRT-LLM PR: 6754
File: tests/integration/test_lists/test-db/l0_a30.yml:41-47
Timestamp: 2025-08-13T11:07:11.772Z
Learning: In TensorRT-LLM test configuration files like tests/integration/test_lists/test-db/l0_a30.yml, TIMEOUT values are specified in minutes, not seconds.
Applied to files:
tests/integration/test_lists/test-db/l0_gb200_multi_nodes.yml
📚 Learning: 2025-08-29T14:07:45.863Z
Learnt from: EmmaQiaoCh
Repo: NVIDIA/TensorRT-LLM PR: 7370
File: tests/unittest/trt/model_api/test_model_quantization.py:24-27
Timestamp: 2025-08-29T14:07:45.863Z
Learning: In TensorRT-LLM's CI infrastructure, pytest skip markers (pytest.mark.skip) are properly honored even when test files have __main__ blocks that call test functions directly. The testing system correctly skips tests without requiring modifications to the __main__ block execution pattern.
Applied to files:
tests/integration/defs/accuracy/test_llm_api_pytorch.py
📚 Learning: 2025-08-11T20:09:24.389Z
Learnt from: achartier
Repo: NVIDIA/TensorRT-LLM PR: 6763
File: tests/integration/defs/triton_server/conftest.py:16-22
Timestamp: 2025-08-11T20:09:24.389Z
Learning: In the TensorRT-LLM test infrastructure, the team prefers simple, direct solutions (like hard-coding directory traversal counts) over more complex but robust approaches when dealing with stable directory structures. They accept the maintenance cost of updating tests if the layout changes.
Applied to files:
tests/integration/defs/accuracy/test_llm_api_pytorch.py
🧬 Code graph analysis (4)
tensorrt_llm/executor/base_worker.py (3)
tensorrt_llm/_torch/device_mesh.py (1)
rank(36-37)tensorrt_llm/mapping.py (2)
rank(199-200)rank(203-210)tensorrt_llm/_torch/distributed/communicator.py (2)
rank(40-41)rank(451-452)
tensorrt_llm/executor/worker.py (2)
tensorrt_llm/_utils.py (1)
mpi_rank(537-544)tensorrt_llm/llmapi/utils.py (1)
logger_debug(106-120)
tensorrt_llm/llmapi/llm.py (10)
tensorrt_llm/executor/base_worker.py (1)
shutdown(640-649)tensorrt_llm/executor/proxy.py (1)
shutdown(292-341)tensorrt_llm/executor/ray_executor.py (1)
shutdown(290-345)tensorrt_llm/executor/ray_gpu_worker.py (2)
shutdown(153-158)shutdown(298-339)tensorrt_llm/executor/rpc_proxy.py (1)
shutdown(189-235)tensorrt_llm/executor/rpc_worker.py (1)
shutdown(101-110)tensorrt_llm/executor/utils.py (1)
shutdown(103-107)tensorrt_llm/executor/worker.py (1)
shutdown(86-127)tensorrt_llm/llmapi/mpi_session.py (2)
shutdown(100-101)shutdown(162-166)tensorrt_llm/scaffolding/worker.py (3)
shutdown(35-36)shutdown(118-120)shutdown(260-262)
tests/integration/defs/accuracy/test_llm_api_pytorch.py (1)
tests/integration/defs/conftest.py (2)
parametrize_with_ids(1832-1858)print_device_memory(2046-2063)
🪛 Ruff (0.14.10)
tensorrt_llm/executor/utils.py
105-105: f-string without any placeholders
Remove extraneous f prefix
(F541)
tensorrt_llm/executor/worker.py
343-343: Use raise without specifying exception name
Remove exception name
(TRY201)
tensorrt_llm/llmapi/llm.py
881-881: Avoid specifying long messages outside the exception class
(TRY003)
tensorrt_llm/llmapi/mpi_session.py
163-163: f-string without any placeholders
Remove extraneous f prefix
(F541)
242-242: f-string without any placeholders
Remove extraneous f prefix
(F541)
tests/integration/defs/conftest.py
2015-2015: Function call with shell=True parameter identified, security issue
(S604)
2029-2029: Abstract raise to an inner function
(TRY301)
2029-2029: Avoid specifying long messages outside the exception class
(TRY003)
2040-2040: Do not use bare except
(E722)
2056-2056: f-string without any placeholders
Remove extraneous f prefix
(F541)
2057-2057: Starting a process with a partial executable path
(S607)
tests/integration/defs/accuracy/test_llm_api_pytorch.py
538-538: Unused method argument: pp_size
(ARG002)
1361-1361: f-string without any placeholders
Remove extraneous f prefix
(F541)
1420-1420: f-string without any placeholders
Remove extraneous f prefix
(F541)
1433-1433: f-string without any placeholders
Remove extraneous f prefix
(F541)
1437-1437: f-string without any placeholders
Remove extraneous f prefix
(F541)
1440-1440: f-string without any placeholders
Remove extraneous f prefix
(F541)
2295-2295: f-string without any placeholders
Remove extraneous f prefix
(F541)
2343-2343: f-string without any placeholders
Remove extraneous f prefix
(F541)
tensorrt_llm/executor/rpc_worker.py
106-106: Undefined name os
(F821)
⏰ 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
🔇 Additional comments (4)
tensorrt_llm/executor/worker.py (2)
86-128: Additional shutdown diagnostics inGenerationExecutorWorkerlook safeThe new PID-annotated prints around worker and engine shutdown are side-effect-only and don’t alter the existing shutdown sequencing or guards (
doing_shutdown, engine cleanup). Safe to keep for troubleshooting.
175-176: Worker main-loop diagnostics are reasonableThe extra log/print when:
- entering/exiting
worker_main, and- exiting the request loop or error path,
help clarify shutdown paths without changing control flow. The final
logger_debugon exit is also low-risk.Also applies to: 326-344
tests/integration/test_lists/test-db/l0_gb200_multi_nodes.yml (1)
35-38: Isolated scheduling flags for DeepSeekR1 multi-node tests look consistentAdding
ISOLATIONto these long-runningtest_nvfp4_multi_gpus[...]cases under thepost_mergeblock matches the existing TIMEOUT-style syntax and should help keep them from overlapping with other heavy jobs. No functional impact on the tests themselves.tests/integration/defs/accuracy/test_llm_api_pytorch.py (1)
17-17: Consider the intended lifespan of this diagnostic code.Based on the PR title "Test oom case" and the commit messages about logging device memory, this appears to be diagnostic code for investigating OOM scenarios. However, the current implementation has several concerns for production use:
- Performance impact: Sleep times totaling 240+ seconds per test run
- Incomplete implementation: Unused
pp_sizeparameter (line 538)- Code quality: Commented-out code, f-strings without placeholders
- Manual resource management: Unusual gc.collect() patterns
Recommendations:
If this is temporary debugging:
- Consider keeping in a separate branch or behind a feature flag
- Document in the PR description that it's for diagnostic purposes only
- Plan for cleanup before merge
If this needs to be permanent:
- Make all diagnostics conditional via environment variable
- Fix the unused
pp_sizeparameter- Remove commented-out code and fix f-strings
- Investigate why manual GC is needed and fix root cause
- Reduce or make sleep times configurable
Would you like help refactoring this to use conditional diagnostics or pytest fixtures for cleaner integration?
Also applies to: 63-65
⛔ Skipped due to learnings
Learnt from: djns99 Repo: NVIDIA/TensorRT-LLM PR: 6915 File: cpp/tensorrt_llm/kernels/cutlass_kernels/moe_gemm/moe_kernels.cu:4010-4012 Timestamp: 2025-08-14T23:23:27.449Z Learning: For MOE (Mixture of Experts) code reviews in TensorRT-LLM, avoid repeatedly suggesting finalize fusion validation checks and safety assertions. The user djns99 has indicated these suggestions are repetitive and unwanted across multiple MOE-related changes.
|
PR_Github #30048 [ run ] triggered by Bot. Commit: |
|
PR_Github #30048 [ run ] completed with state
|
|
/bot run --stage-list "GB200-8_GPUs-2_Nodes-PyTorch-1,GB200-4_GPUs-PyTorch-2" |
|
PR_Github #30061 [ run ] triggered by Bot. Commit: |
|
PR_Github #30061 [ run ] completed with state
|
|
/bot run --stage-list "GB200-8_GPUs-2_Nodes-PyTorch-1,GB200-4_GPUs-PyTorch-2" |
|
PR_Github #30099 [ run ] triggered by Bot. Commit: |
|
PR_Github #30099 [ run ] completed with state
|
|
/bot run --stage-list "GB200-8_GPUs-2_Nodes-PyTorch-1,GB200-4_GPUs-PyTorch-2" --disable-fail-fast |
|
PR_Github #30126 [ run ] triggered by Bot. Commit: |
|
PR_Github #30126 [ run ] completed with state
|
617296a to
851f657
Compare
|
/bot run --stage-list "GB200-8_GPUs-2_Nodes-PyTorch-1,GB200-4_GPUs-PyTorch-2" --disable-fail-fast |
|
PR_Github #30151 [ run ] triggered by Bot. Commit: |
|
PR_Github #30151 [ run ] completed with state
|
|
/bot run --stage-list "GB200-8_GPUs-2_Nodes-PyTorch-1,GB200-4_GPUs-PyTorch-2" --disable-fail-fast |
851f657 to
5f03844
Compare
|
/bot run --stage-list "GB200-8_GPUs-2_Nodes-PyTorch-1,GB200-4_GPUs-PyTorch-2" --disable-fail-fast |
|
PR_Github #30390 [ run ] triggered by Bot. Commit: |
5f03844 to
57a10ee
Compare
|
/bot run --stage-list "GB200-8_GPUs-2_Nodes-PyTorch-1,GB200-4_GPUs-PyTorch-2" --disable-fail-fast |
|
PR_Github #30419 [ run ] triggered by Bot. Commit: |
|
/bot run --disable-fail-fast |
1 similar comment
|
/bot run --disable-fail-fast |
|
/bot run |
Signed-off-by: Hui Gao <[email protected]>
Signed-off-by: Hui Gao <[email protected]>
Signed-off-by: Hui Gao <[email protected]>
05a081c to
bbf4646
Compare
|
/bot run --disable-fail-fast |
|
PR_Github #30502 [ run ] triggered by Bot. Commit: |
|
PR_Github #30502 [ run ] completed with state |
Signed-off-by: Hui Gao <[email protected]>
Signed-off-by: Hui Gao <[email protected]>
Superjomn
left a 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.
LGTM
|
/bot reuse-pipeline |
|
PR_Github #30519 [ reuse-pipeline ] triggered by Bot. Commit: |
|
PR_Github #30519 [ reuse-pipeline ] completed with state |
Signed-off-by: Hui Gao <[email protected]>
|
/bot reuse-pipeline |
|
PR_Github #30541 [ reuse-pipeline ] triggered by Bot. Commit: |
|
PR_Github #30541 [ reuse-pipeline ] completed with state |
QiJune
left a 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.
LGTM
Summary by CodeRabbit
Tests
Chores
✏️ 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 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.