-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[TRTLLM-6780][fix] Add multimodal data to dummy requests during memory profiling #7539
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
5ef543f to
617ca5b
Compare
|
Could you also create or modify a unit test that invokes |
fd94e35 to
91da825
Compare
|
@xinli-sw @vadiklyutiy @benchislett Can you take another look when you get a chance? I also added a unit test |
9cc9de7 to
87bf8ad
Compare
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.
Thanks for the work! Left some design questions.
7511010 to
5d8a9ff
Compare
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.
Thx for addressing what I mentioned. I am adding one more comment regarding the design.
f60cf91 to
18aa14e
Compare
|
@yechank-nvidia I rebase after your changes and I run into some issues. During profiling with mm data dummy reqs, I get this error: I can get around it by moving all to cpu before pinning: Also If I stress test (num reqs > 100) , I get this error: I think someone also notice it and left a comment on your PR saying: |
|
/bot run |
📝 WalkthroughWalkthroughAdds a dummy-inputs builder for multimodal Qwen2VL, exposes BaseDummyInputsBuilder, and integrates profiling_stage_data through PyExecutor into KvCacheCreator. KV-cache profiling can create multimodal dummy requests and records computed memory back into profiling data. Introduces a serve CLI flag enable_chunked_prefill and a new memory profiling unit test. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant CLI as serve CLI
participant Args as get_llm_args
participant Exec as create_py_executor
participant KVC as KvCacheCreator
participant Model as Qwen2VL* InputProcessor
participant Prof as profiling_stage_data
User->>CLI: serve --enable_chunked_prefill [optional]
CLI->>Args: build llm_args (includes enable_chunked_prefill)
Args-->>CLI: llm_args
CLI->>Exec: create_py_executor(llm_args, profiling_stage_data)
Exec->>KVC: KvCacheCreator(..., profiling_stage_data)
Note over KVC: Configure KV-cache capacity
KVC->>Model: original_arch / dummy MM prompt (if vision/mm)
Model-->>KVC: dummy multimodal context
KVC->>Prof: set max_gpu_total_bytes
KVC-->>Exec: KV-cache configured
Exec-->>CLI: PyExecutor ready
sequenceDiagram
autonumber
participant Prof as profiling_stage_data
participant KVC as KvCacheCreator
participant Ctx as _create_dummy_context_requests
participant MMCtx as _create_dummy_mm_context_request
Prof-->>KVC: provided (optional)
KVC->>Ctx: build context requests
alt Model is multimodal/vision
Ctx->>MMCtx: create dummy MM request
MMCtx-->>Ctx: MM context
else
Ctx-->>KVC: text-only context
end
KVC->>Prof: write max_gpu_total_bytes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
Tip 👮 Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. 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: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
tensorrt_llm/_torch/pyexecutor/py_executor_creator.py (2)
1-1: Add NVIDIA Apache-2.0 header.Per repo guidelines, prepend the NVIDIA Apache-2.0 copyright header with current year at the top of this file.
Apply this diff:
+# Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License.
322-323: Fix logging bug: improper use of logging args will raise TypeError.
logger.info("...", attn_runtime_features)uses %-style formatting and will error since message has no placeholders.Apply this diff:
- logger.info("ATTENTION RUNTIME FEATURES: ", attn_runtime_features) + logger.info("ATTENTION RUNTIME FEATURES: %s", attn_runtime_features)tensorrt_llm/_torch/models/modeling_qwen2vl.py (1)
1-1: Add NVIDIA Apache-2.0 header.Per repo guidelines, prepend the NVIDIA Apache-2.0 copyright header with current year at the top of this file.
Apply this diff:
+# Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# http://www.apache.org/licenses/LICENSE-2.0 +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License.
🧹 Nitpick comments (4)
tensorrt_llm/_torch/pyexecutor/_util.py (2)
163-164: Consider improving error message clarityThe current message could be more specific about which models are affected and what the impact might be on profiling accuracy.
Consider expanding the warning message:
- input_processor = create_input_processor(model_name_or_path, tokenizer) - if not (hasattr(input_processor, "get_dummy_prompt")): - logger.warning("The input processor of the model does not have the method [get_dummy_prompt] implemented." \ - "Profiling with the default input dummy context request. This may not take into account the memory consumption of " \ - "the image encoder") + input_processor = create_input_processor(model_name_or_path, tokenizer) + if not (hasattr(input_processor, "get_dummy_prompt")): + logger.warning(f"Input processor for model '{model_name_or_path}' does not implement get_dummy_prompt(). " \ + "Falling back to text-only dummy requests for profiling. " \ + "This may underestimate memory consumption for vision-language models.")
215-223: Consider refactoring multimodal detection logicThe condition checking for both
original_archattribute and MODEL_CLASS_VISION_ENCODER_MAPPING could be extracted for clarity and reuse.Consider extracting the multimodal model detection:
+ def _is_multimodal_model(self) -> bool: + """Check if the model is a multimodal/vision model.""" + return (hasattr(self._model_engine.model, "original_arch") and + MODEL_CLASS_VISION_ENCODER_MAPPING.get( + self._model_engine.model.original_arch, None) is not None) + def _create_dummy_context_requests( self, input_seq_len: int) -> List[trtllm.Request]: requests = [] - if hasattr(self._model_engine.model, - "original_arch") and MODEL_CLASS_VISION_ENCODER_MAPPING.get( - self._model_engine.model.original_arch, None): + if self._is_multimodal_model(): requests = self._create_dummy_mm_context_request(input_seq_len)tensorrt_llm/_torch/pyexecutor/py_executor_creator.py (1)
34-38: Duplicate import of is_mla; remove ambiguity.Both
. _utiland.config_utilsexportis_mla. Pick one to avoid accidental shadowing.Apply this diff to keep the
config_utilsversion:-from ._util import (KvCacheCreator, _adjust_torch_mem_fraction, - create_py_executor_instance, instantiate_sampler, is_mla) +from ._util import (KvCacheCreator, _adjust_torch_mem_fraction, + create_py_executor_instance, instantiate_sampler) from .config import PyTorchConfig, _construct_checkpoint_loader -from .config_utils import is_mla +from .config_utils import is_mlatensorrt_llm/_torch/models/modeling_qwen2vl.py (1)
294-298: Avoid repeating the same PIL instance N times.Minor: create distinct Image objects to sidestep accidental in‑place mutations affecting all entries.
Apply this diff:
- def get_dummy_images(self, max_width: int, max_height: int, - num_images: int): - image = Image.new("RGB", (max_width, max_height), color=255) - return [image] * num_images + def get_dummy_images(self, max_width: int, max_height: int, + num_images: int) -> List[Image.Image]: + return [ + Image.new("RGB", (max_width, max_height), color=255) + for _ in range(num_images) + ]
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
tensorrt_llm/_torch/models/modeling_qwen2vl.py(6 hunks)tensorrt_llm/_torch/pyexecutor/_util.py(5 hunks)tensorrt_llm/_torch/pyexecutor/py_executor_creator.py(2 hunks)tensorrt_llm/commands/serve.py(5 hunks)tensorrt_llm/inputs/__init__.py(2 hunks)tensorrt_llm/inputs/registry.py(1 hunks)tests/unittest/llmapi/test_memory_profiling.py(1 hunks)
🧰 Additional context used
📓 Path-based instructions (3)
**/*.{h,hpp,hh,hxx,cpp,cxx,cc,cu,cuh,py}
📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
Use only spaces, no tabs; indent with 4 spaces.
Files:
tensorrt_llm/inputs/registry.pytests/unittest/llmapi/test_memory_profiling.pytensorrt_llm/inputs/__init__.pytensorrt_llm/commands/serve.pytensorrt_llm/_torch/pyexecutor/_util.pytensorrt_llm/_torch/pyexecutor/py_executor_creator.pytensorrt_llm/_torch/models/modeling_qwen2vl.py
**/*.py
📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
**/*.py: Python code must target Python 3.8+.
Indent Python code with 4 spaces; do not use tabs.
Maintain module namespace when importing; prefer 'from package.subpackage import foo' then 'foo.SomeClass()' instead of importing the class directly.
Python filenames should be snake_case (e.g., some_file.py).
Python classes use PascalCase names.
Functions and methods use snake_case names.
Local variables use snake_case; prefix 'k' for variables that start with a number (e.g., k_99th_percentile).
Global variables use upper SNAKE_CASE prefixed with 'G' (e.g., G_MY_GLOBAL).
Constants use upper SNAKE_CASE (e.g., MY_CONSTANT).
Avoid shadowing variables from an outer scope.
Initialize all externally visible members of a class in the constructor.
Prefer docstrings for interfaces that may be used outside a file; comments for in-function or file-local interfaces.
Use Google-style docstrings for classes and functions (Sphinx-parsable).
Document attributes and variables inline so they render under the class/function docstring.
Avoid reflection when a simpler, explicit approach suffices (e.g., avoid dict(**locals()) patterns).
In try/except, catch the most specific exceptions possible.
For duck-typing try/except, keep the try body minimal and use else for the main logic.
Files:
tensorrt_llm/inputs/registry.pytests/unittest/llmapi/test_memory_profiling.pytensorrt_llm/inputs/__init__.pytensorrt_llm/commands/serve.pytensorrt_llm/_torch/pyexecutor/_util.pytensorrt_llm/_torch/pyexecutor/py_executor_creator.pytensorrt_llm/_torch/models/modeling_qwen2vl.py
**/*.{cpp,cxx,cc,h,hpp,hh,hxx,cu,cuh,py}
📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
Prepend the NVIDIA Apache-2.0 copyright header with current year to the top of all source files (e.g., .cpp, .h, .cu, .py).
Files:
tensorrt_llm/inputs/registry.pytests/unittest/llmapi/test_memory_profiling.pytensorrt_llm/inputs/__init__.pytensorrt_llm/commands/serve.pytensorrt_llm/_torch/pyexecutor/_util.pytensorrt_llm/_torch/pyexecutor/py_executor_creator.pytensorrt_llm/_torch/models/modeling_qwen2vl.py
🧠 Learnings (5)
📚 Learning: 2025-08-26T09:37:10.463Z
Learnt from: jiaganc
PR: NVIDIA/TensorRT-LLM#7031
File: tensorrt_llm/bench/dataclasses/configuration.py:90-104
Timestamp: 2025-08-26T09:37:10.463Z
Learning: In TensorRT-LLM, the `get_pytorch_perf_config()` method returns `self.pytorch_config` which can contain default `cuda_graph_config` values, so `llm_args` may already have this config before the extra options processing.
Applied to files:
tensorrt_llm/commands/serve.pytensorrt_llm/_torch/models/modeling_qwen2vl.py
📚 Learning: 2025-08-11T20:09:24.389Z
Learnt from: achartier
PR: NVIDIA/TensorRT-LLM#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:
tensorrt_llm/_torch/models/modeling_qwen2vl.py
📚 Learning: 2025-07-22T09:22:14.726Z
Learnt from: yechank-nvidia
PR: NVIDIA/TensorRT-LLM#6254
File: tensorrt_llm/_torch/pyexecutor/model_engine.py:1201-1204
Timestamp: 2025-07-22T09:22:14.726Z
Learning: In TensorRT-LLM's multimodal processing pipeline, shared tensor recovery using `from_shared_tensor()` is only needed during the context phase. Generation requests reuse the already-recovered tensor data and only need to call `strip_for_generation()` to remove unnecessary multimodal data while preserving the recovered tensors. This avoids redundant tensor recovery operations during generation.
Applied to files:
tensorrt_llm/_torch/models/modeling_qwen2vl.py
📚 Learning: 2025-08-26T09:37:10.463Z
Learnt from: jiaganc
PR: NVIDIA/TensorRT-LLM#7031
File: tensorrt_llm/bench/dataclasses/configuration.py:90-104
Timestamp: 2025-08-26T09:37:10.463Z
Learning: In TensorRT-LLM's bench configuration, the `get_pytorch_perf_config()` method returns `self.pytorch_config` which is a Dict[str, Any] that can contain default values including `cuda_graph_config`, making the fallback `llm_args["cuda_graph_config"]` safe to use.
Applied to files:
tensorrt_llm/_torch/models/modeling_qwen2vl.py
📚 Learning: 2025-08-11T13:58:57.678Z
Learnt from: tomeras91
PR: NVIDIA/TensorRT-LLM#6796
File: tensorrt_llm/_torch/pyexecutor/mamba_cache_manager.py:201-201
Timestamp: 2025-08-11T13:58:57.678Z
Learning: When a PR is intended for pure code movement/refactoring (moving code from one file to another), avoid suggesting code changes including linting fixes, as the goal is to keep the code exactly as it was in the original location.
Applied to files:
tensorrt_llm/_torch/models/modeling_qwen2vl.py
🧬 Code graph analysis (5)
tensorrt_llm/inputs/registry.py (1)
tensorrt_llm/_torch/models/modeling_qwen2vl.py (1)
get_dummy_prompt(299-312)
tests/unittest/llmapi/test_memory_profiling.py (3)
tensorrt_llm/_torch/pyexecutor/py_executor_creator.py (1)
create_py_executor(210-693)tensorrt_llm/llmapi/llm_args.py (4)
DynamicBatchConfig(792-814)SchedulerConfig(818-836)CudaGraphConfig(108-165)TorchLlmArgs(2126-2550)tensorrt_llm/executor/postproc_worker.py (1)
enabled(48-49)
tensorrt_llm/inputs/__init__.py (1)
tensorrt_llm/inputs/registry.py (1)
BaseDummyInputsBuilder(45-52)
tensorrt_llm/_torch/pyexecutor/_util.py (3)
tensorrt_llm/_torch/model_config.py (2)
ModelConfig(110-582)from_pretrained(405-445)tensorrt_llm/inputs/registry.py (3)
create_input_processor(421-450)create_input_processor_with_hash(453-569)get_dummy_prompt(50-52)tensorrt_llm/_torch/models/modeling_qwen2vl.py (1)
get_dummy_prompt(299-312)
tensorrt_llm/_torch/models/modeling_qwen2vl.py (2)
tensorrt_llm/inputs/registry.py (4)
BaseDummyInputsBuilder(45-52)BaseMultimodalInputProcessor(55-188)InputProcessor(22-42)get_dummy_prompt(50-52)tensorrt_llm/inputs/utils.py (1)
default_multimodal_input_loader(450-613)
🔇 Additional comments (18)
tensorrt_llm/commands/serve.py (3)
89-89: Parameter consistency:enable_chunked_prefilladded properlyThe new parameter
enable_chunked_prefillfollows the existing pattern and is correctly propagated through the function signature and the returned dictionary.Also applies to: 133-133
290-293: LGTM: CLI option follows established patternsThe new
--enable_chunked_prefillflag is properly defined with appropriate type, default value, and help text.
303-304: Verify chunked prefill compatibility with attention backends and quantization
- Repository already contains compatibility checks and notes — see tensorrt_llm/llmapi/llm.py (raises ValueError when backend == "pytorch" and chunked prefill isn't enabled), tensorrt_llm/_torch/pyexecutor/py_executor_creator.py (checks attn_backend == "FLASHINFER_STAR_ATTENTION" together with enable_chunked_context), and tests/integration/defs/accuracy/test_llm_api_pytorch.py (comment: "chunked prefill is not supported for fp8 and nvfp4").
- Ensure the new serve.py parameter is forwarded into get_llm_args / LLM initialization, verify consistency between enable_chunked_prefill and enable_chunked_context, and add runtime validation or documentation if chunked prefill is incompatible with certain quantization modes or attention backends.
tensorrt_llm/_torch/pyexecutor/_util.py (3)
51-60: LGTM: Proper handling of profiling stage data parameterThe new
profiling_stage_dataparameter is correctly added as a keyword-only argument and properly stored as an instance variable.
425-428: LGTM: Profiling data properly updated with memory metricsThe code correctly updates the profiling stage data with the computed max_gpu_total_bytes when profiling data is provided.
152-211: Comprehensive multimodal dummy request generation — verifiedConfirmed: get_dummy_prompt is implemented (tensorrt_llm/_torch/models/modeling_qwen2vl.py), create_input_processor and create_input_processor_with_hash exist (tensorrt_llm/inputs/registry.py), and vision-encoder registration/mapping (MODEL_CLASS_VISION_ENCODER_MAPPING / register_vision_encoder) is present — no changes required.
tensorrt_llm/inputs/registry.py (1)
45-53: Well-designed base class for dummy input generationThe
BaseDummyInputsBuilderbase class is properly designed with:
- Clear docstring explaining its purpose for profiling
- Abstract method that raises NotImplementedError with a helpful message
- Appropriate method signature for multimodal dummy prompt generation
tensorrt_llm/inputs/__init__.py (1)
3-3: LGTM: Proper API exposure of BaseDummyInputsBuilderThe new
BaseDummyInputsBuilderclass is correctly imported and added to__all__for public API exposure.Also applies to: 32-32
tests/unittest/llmapi/test_memory_profiling.py (1)
18-81: Well-structured test for memory profiling with multimodal requestsThe test properly validates that:
- Memory profiling with multimodal requests (
enable_mm_reqs=True) accounts for vision encoder memory- The available KV cache memory is reduced when multimodal profiling is enabled
- Both profiling scenarios are properly cleaned up
tensorrt_llm/_torch/models/modeling_qwen2vl.py (7)
5-5: Import numpy: OK.Needed for efficient random token generation.
8-8: Import PIL.Image: OK.Required for dummy image synthesis.
30-35: Expose dummy-input and loader utilities: OK.Imports align with the new BaseDummyInputsBuilder flow.
90-92: Extending Qwen2VLInputProcessorBase with BaseDummyInputsBuilder: OK.Proper place to centralize dummy multimodal generation for profiling.
101-106: Persist model_path for loader: OK.Needed by default_multimodal_input_loader.
299-313: Dummy prompt construction via default_multimodal_input_loader: OK.Shape choice (3584x3584) matches max_pixels target; interface usage looks correct.
827-827: Persist original architecture: OK.This unblocks downstream mappings that rely on the pre‑post_config architecture.
Please confirm MODEL_CLASS_VISION_ENCODER_MAPPING (or equivalent) now picks up
original_archas intended.tensorrt_llm/_torch/pyexecutor/py_executor_creator.py (2)
216-217: create_py_executor: profiling_stage_data call sites verified — OK. Definition is in tensorrt_llm/_torch/pyexecutor/py_executor_creator.py; the only callers found are tests/unittest/llmapi/test_memory_profiling.py (they already pass profiling_stage_data). Signature is optional/backward‑compatible.
577-578: KvCacheCreator.init includes profiling_stage_data — resolved.
Verified in tensorrt_llm/_torch/pyexecutor/_util.py: def init(..., profiling_stage_data: Optional[dict])
|
PR_Github #19718 [ run ] triggered by Bot |
|
PR_Github #19718 [ run ] completed with state |
Signed-off-by: John Calderon <jcalderon@nvidia.com>
Signed-off-by: John Calderon <jcalderon@nvidia.com>
Signed-off-by: John Calderon <jcalderon@nvidia.com>
Signed-off-by: John Calderon <jcalderon@nvidia.com>
…s from modeling qwen Signed-off-by: John Calderon <jcalderon@nvidia.com>
Signed-off-by: John Calderon <jcalderon@nvidia.com>
Signed-off-by: John Calderon <jcalderon@nvidia.com>
Signed-off-by: John Calderon <jcalderon@nvidia.com>
…-8B-FP16-vila/NVILA-8B-video-False] Signed-off-by: John Calderon <jcalderon@nvidia.com>
…and A10-PyTorch-1.test_e2e.test_trtllm_serve_multimodal_example Signed-off-by: John Calderon <jcalderon@nvidia.com>
Signed-off-by: John Calderon <jcalderon@nvidia.com>
Signed-off-by: John Calderon <jcalderon@nvidia.com>
Signed-off-by: John Calderon <jcalderon@nvidia.com>
Signed-off-by: John Calderon <jcalderon@nvidia.com>
6fd93ce to
5410711
Compare
Signed-off-by: John Calderon <jcalderon@nvidia.com>
|
/bot run |
|
PR_Github #21490 [ run ] triggered by Bot |
|
PR_Github #21490 [ run ] completed with state |
|
/bot run |
|
PR_Github #21497 [ run ] triggered by Bot |
|
PR_Github #21497 [ run ] completed with state |
|
/bot run |
|
PR_Github #21499 [ run ] triggered by Bot |
|
PR_Github #21499 [ run ] completed with state |
|
@Funatiq thank your for your review and comments. |
…y profiling (NVIDIA#7539) Signed-off-by: John Calderon <johncalesp@gmail.com> Signed-off-by: John Calderon <jcalderon@nvidia.com> Signed-off-by: john calderon <jcalderon@nvidia.com> Signed-off-by: John Calderon <jcalderon@nvidia>
Summary by CodeRabbit
New Features
Tests
Description
Take into account memory consumption of vision part for VLM's
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
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-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.