[TRTLLM-9654][feat] Support DeepSeek-V32 chat template - #9814
Conversation
📝 WalkthroughWalkthroughIntroduces DeepSeek V32 tokenizer support to the TensorRT LLM framework by adding a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes
Pre-merge checks and finishing touches❌ Failed checks (2 warnings)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (6)
tensorrt_llm/llmapi/deepseek_v32/tokenizer.py (3)
19-22: Prefer callingsuper().__init__for base-class initialization
__init__currently re-implements the baseTransformersTokenizerinitializer instead of delegating. This works today but is brittle if the base class adds fields later.- def __init__(self, tokenizer): - # tokenizer should be the HF tokenizer - self.tokenizer = tokenizer - self._all_special_tokens_set = set(self.tokenizer.all_special_tokens) + def __init__(self, tokenizer): + # tokenizer should be the HF tokenizer + super().__init__(tokenizer)
25-42: Remove or use the unuseddownload_dirparameter
from_pretraineddeclaresdownload_dirbut never uses it or forwards it toAutoTokenizer.from_pretrained, which is slightly misleading and triggers static analysis complaints.Either drop the parameter or pass it through (e.g., as
cache_dir) if that was the intent. If you don’t plan to support it, simplifying the signature is clearer.
44-55: Clarify behavior ofapply_chat_templatefor DeepSeek-specific kwargs
apply_chat_templateonly consumes athinkingflag from**kwargsand ignores other possible arguments (likeadd_generation_prompt,chat_template, etc.) that upstream callers might pass for HF chat templates.The current behavior is fine for the DeepSeek V3.2 path as wired in
inputs/utils.apply_chat_template, but it would help future readers to document this explicitly in a short docstring or comment so it’s clear which kwargs are honored and that generation-prompt behavior is entirely encoded inencode_messages.tensorrt_llm/llmapi/deepseek_v32/encoding.py (1)
208-215: Parenthesizeand/orchain for clarityThe assertion mixes
orandand:assert index == 0 or prev_assistant_idx >= 0 and assistant_msg.get("role") == "assistant", ...Although the current precedence (
index == 0 or (prev_assistant_idx >= 0 and role == "assistant")) is likely what you intend, it’s clearer and silences RUF021 to make it explicit:- assert index == 0 or prev_assistant_idx >= 0 and assistant_msg.get("role") == "assistant", ( + assert index == 0 or ( + prev_assistant_idx >= 0 and assistant_msg.get("role") == "assistant" + ), ( f"Invalid messages at {index}:\n{assistant_msg}" )tensorrt_llm/inputs/utils.py (1)
585-595: DeepSeek V3.2 chat-template branch is coherentThe DeepSeek-specific branch cleanly short-circuits before the generic
TransformersTokenizerpath, delegates prompt construction toDeepseekV32Tokenizer.apply_chat_template, and mirrors theenable_tokenizebehavior by returningencode(prompt)when requested.Note that
add_generation_promptand HFchat_templateresolution are intentionally bypassed for this mode; consider adding a short comment to that effect if you expect future contributors to extend this function.tensorrt_llm/llmapi/llm_args.py (1)
2052-2063: DeepSeek tokenizer init branch works; document instance-vs-path expectationThe new
elif self.tokenizer_mode == 'deepseek_v32'branch correctly wiresDeepseekV32Tokenizer.from_pretrainedwith either the explicit tokenizer path or the model name and preservestrust_remote_code/use_fastsemantics.One nuance: this assumes
self.tokenizeris a path/name, not an already-instantiated tokenizer. If a caller passes a tokenizer object while also settingtokenizer_mode='deepseek_v32',from_pretrainedwill likely fail. If that scenario is possible in your usage, consider:
- Guarding with
isinstance(self.tokenizer, (str, Path))and, if it’s already a tokenizer, wrapping it directly:self.tokenizer = DeepseekV32Tokenizer(self.tokenizer), or- Explicitly documenting that for
deepseek_v32you must provide a path/name, not a tokenizer instance.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
tensorrt_llm/commands/eval.py(3 hunks)tensorrt_llm/commands/serve.py(5 hunks)tensorrt_llm/inputs/utils.py(2 hunks)tensorrt_llm/llmapi/deepseek_v32/__init__.py(1 hunks)tensorrt_llm/llmapi/deepseek_v32/encoding.py(1 hunks)tensorrt_llm/llmapi/deepseek_v32/tokenizer.py(1 hunks)tensorrt_llm/llmapi/llm_args.py(2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
**/*.py
📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
**/*.py: The 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 (e.g., usefrom package.subpackage import fooand thenfoo.SomeClass()instead offrom package.subpackage.foo import SomeClass)
Python filenames should use snake_case (e.g.,some_file.py)
Python class names should use PascalCase (e.g.,class SomeClass)
Python function and method names should use snake_case (e.g.,def my_awesome_function():)
Python local variable names should use snake_case, with prefixkfor variable names that start with a number (e.g.,k_99th_percentile = ...)
Python global variables should use upper snake_case with prefixG(e.g.,G_MY_GLOBAL = ...)
Python constants should use upper snake_case (e.g.,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 for Python classes and functions, which can be parsed by Sphinx
Python attributes and variables can be documented inline with type and description (e.g.,self.x = 5followed by"""<type>: Description of 'x'""")
Avoid using reflection in Python when functionality can be easily achieved without reflection
When using try-except blocks in Python, limit the except clause to the smallest set of specific errors possible instead of catching all exceptions
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 and use the else block to implement the logic
Files:
tensorrt_llm/commands/eval.pytensorrt_llm/inputs/utils.pytensorrt_llm/commands/serve.pytensorrt_llm/llmapi/deepseek_v32/__init__.pytensorrt_llm/llmapi/deepseek_v32/tokenizer.pytensorrt_llm/llmapi/llm_args.pytensorrt_llm/llmapi/deepseek_v32/encoding.py
**/*.{cpp,h,cu,py}
📄 CodeRabbit inference engine (CODING_GUIDELINES.md)
All TensorRT-LLM Open Source Software code files should contain an NVIDIA copyright header that includes the current year at the top
Files:
tensorrt_llm/commands/eval.pytensorrt_llm/inputs/utils.pytensorrt_llm/commands/serve.pytensorrt_llm/llmapi/deepseek_v32/__init__.pytensorrt_llm/llmapi/deepseek_v32/tokenizer.pytensorrt_llm/llmapi/llm_args.pytensorrt_llm/llmapi/deepseek_v32/encoding.py
🧠 Learnings (6)
📓 Common learnings
Learnt from: venkywonka
Repo: NVIDIA/TensorRT-LLM PR: 6029
File: .github/pull_request_template.md:45-53
Timestamp: 2025-08-27T17:50:13.264Z
Learning: For PR templates in TensorRT-LLM, avoid suggesting changes that would increase developer overhead, such as converting plain bullets to mandatory checkboxes. The team prefers guidance-style bullets that don't require explicit interaction to reduce friction in the PR creation process.
Learnt from: samuellees
Repo: NVIDIA/TensorRT-LLM PR: 6974
File: tensorrt_llm/serve/scripts/benchmark_dataset.py:558-566
Timestamp: 2025-08-18T08:42:02.640Z
Learning: In TensorRT-LLM's RandomDataset (tensorrt_llm/serve/scripts/benchmark_dataset.py), when using --random-token-ids option, sequence length accuracy is prioritized over semantic correctness for benchmarking purposes. The encode/decode operations should use skip_special_tokens=True and add_special_tokens=False to ensure exact target token lengths.
📚 Learning: 2025-08-18T08:42:02.640Z
Learnt from: samuellees
Repo: NVIDIA/TensorRT-LLM PR: 6974
File: tensorrt_llm/serve/scripts/benchmark_dataset.py:558-566
Timestamp: 2025-08-18T08:42:02.640Z
Learning: In TensorRT-LLM's RandomDataset (tensorrt_llm/serve/scripts/benchmark_dataset.py), when using --random-token-ids option, sequence length accuracy is prioritized over semantic correctness for benchmarking purposes. The encode/decode operations should use skip_special_tokens=True and add_special_tokens=False to ensure exact target token lengths.
Applied to files:
tensorrt_llm/commands/eval.pytensorrt_llm/commands/serve.pytensorrt_llm/llmapi/llm_args.py
📚 Learning: 2025-08-01T15:14:45.673Z
Learnt from: yibinl-nvidia
Repo: NVIDIA/TensorRT-LLM PR: 6506
File: examples/models/core/mixtral/requirements.txt:3-3
Timestamp: 2025-08-01T15:14:45.673Z
Learning: In TensorRT-LLM, examples directory can have different dependency versions than the root requirements.txt file. Version conflicts between root and examples dependencies are acceptable because examples are designed to be standalone and self-contained.
Applied to files:
tensorrt_llm/inputs/utils.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/inputs/utils.py
📚 Learning: 2025-08-14T15:38:01.771Z
Learnt from: MatthiasKohl
Repo: NVIDIA/TensorRT-LLM PR: 6904
File: cpp/tensorrt_llm/pybind/thop/bindings.cpp:55-57
Timestamp: 2025-08-14T15:38:01.771Z
Learning: In TensorRT-LLM Python bindings, tensor parameter collections like mla_tensor_params and spec_decoding_tensor_params are kept as required parameters without defaults to maintain API consistency, even when it might affect backward compatibility.
Applied to files:
tensorrt_llm/inputs/utils.py
📚 Learning: 2025-11-27T09:23:18.742Z
Learnt from: fredricz-20070104
Repo: NVIDIA/TensorRT-LLM PR: 9511
File: tests/integration/defs/examples/serve/test_serve.py:136-186
Timestamp: 2025-11-27T09:23:18.742Z
Learning: In TensorRT-LLM testing, when adding test cases based on RCCA commands, the command format should be copied exactly as it appears in the RCCA case, even if it differs from existing tests. For example, some RCCA commands for trtllm-serve may omit the "serve" subcommand while others include it.
Applied to files:
tensorrt_llm/commands/serve.py
🧬 Code graph analysis (6)
tensorrt_llm/commands/eval.py (1)
tensorrt_llm/llmapi/llm.py (2)
tokenizer(763-767)tokenizer(770-771)
tensorrt_llm/inputs/utils.py (1)
tensorrt_llm/llmapi/deepseek_v32/tokenizer.py (3)
DeepseekV32Tokenizer(16-147)apply_chat_template(44-55)encode(122-134)
tensorrt_llm/commands/serve.py (4)
tensorrt_llm/llmapi/llm.py (2)
tokenizer(763-767)tokenizer(770-771)tensorrt_llm/_torch/models/modeling_llava_next.py (1)
tokenizer(73-74)tensorrt_llm/_torch/models/modeling_vila.py (1)
tokenizer(905-906)tensorrt_llm/_torch/models/modeling_qwen2vl.py (1)
tokenizer(124-125)
tensorrt_llm/llmapi/deepseek_v32/__init__.py (2)
tensorrt_llm/llmapi/deepseek_v32/encoding.py (2)
encode_messages(291-309)parse_message_from_completion_text(383-425)tensorrt_llm/llmapi/deepseek_v32/tokenizer.py (1)
DeepseekV32Tokenizer(16-147)
tensorrt_llm/llmapi/deepseek_v32/tokenizer.py (3)
tensorrt_llm/llmapi/tokenizer.py (11)
TransformersTokenizer(28-267)from_pretrained(75-78)apply_chat_template(65-69)eos_token_id(40-41)pad_token_id(44-45)is_fast(91-92)get_added_vocab(94-96)encode(51-52)convert_tokens_to_string(105-135)decode(54-55)convert_ids_to_tokens(98-103)tensorrt_llm/llmapi/deepseek_v32/encoding.py (1)
encode_messages(291-309)tensorrt_llm/inputs/utils.py (1)
apply_chat_template(565-617)
tensorrt_llm/llmapi/llm_args.py (1)
tensorrt_llm/llmapi/deepseek_v32/tokenizer.py (2)
DeepseekV32Tokenizer(16-147)from_pretrained(25-42)
🪛 Ruff (0.14.8)
tensorrt_llm/llmapi/deepseek_v32/tokenizer.py
31-31: Unused class method argument: download_dir
(ARG003)
tensorrt_llm/llmapi/deepseek_v32/encoding.py
2-2: Unused noqa directive (non-enabled: E501)
Remove unused noqa directive
(RUF100)
35-35: Possible hardcoded password assigned to: "bos_token"
(S105)
35-35: String contains ambiguous | (FULLWIDTH VERTICAL LINE). Did you mean | (VERTICAL LINE)?
(RUF001)
35-35: String contains ambiguous | (FULLWIDTH VERTICAL LINE). Did you mean | (VERTICAL LINE)?
(RUF001)
36-36: Possible hardcoded password assigned to: "eos_token"
(S105)
36-36: String contains ambiguous | (FULLWIDTH VERTICAL LINE). Did you mean | (VERTICAL LINE)?
(RUF001)
36-36: String contains ambiguous | (FULLWIDTH VERTICAL LINE). Did you mean | (VERTICAL LINE)?
(RUF001)
37-37: Possible hardcoded password assigned to: "thinking_start_token"
(S105)
38-38: Possible hardcoded password assigned to: "thinking_end_token"
(S105)
39-39: Possible hardcoded password assigned to: "dsml_token"
(S105)
39-39: String contains ambiguous | (FULLWIDTH VERTICAL LINE). Did you mean | (VERTICAL LINE)?
(RUF001)
39-39: String contains ambiguous | (FULLWIDTH VERTICAL LINE). Did you mean | (VERTICAL LINE)?
(RUF001)
41-41: String contains ambiguous | (FULLWIDTH VERTICAL LINE). Did you mean | (VERTICAL LINE)?
(RUF001)
41-41: String contains ambiguous | (FULLWIDTH VERTICAL LINE). Did you mean | (VERTICAL LINE)?
(RUF001)
41-41: String contains ambiguous | (FULLWIDTH VERTICAL LINE). Did you mean | (VERTICAL LINE)?
(RUF001)
41-41: String contains ambiguous | (FULLWIDTH VERTICAL LINE). Did you mean | (VERTICAL LINE)?
(RUF001)
42-42: String contains ambiguous | (FULLWIDTH VERTICAL LINE). Did you mean | (VERTICAL LINE)?
(RUF001)
42-42: String contains ambiguous | (FULLWIDTH VERTICAL LINE). Did you mean | (VERTICAL LINE)?
(RUF001)
57-57: Do not catch blind exception: Exception
(BLE001)
208-208: Parenthesize a and b expressions when chaining and and or together, to make the precedence clear
Parenthesize the and subexpression
(RUF021)
🔇 Additional comments (10)
tensorrt_llm/llmapi/deepseek_v32/encoding.py (2)
35-52: Unicode token constants and S105/RUF001 warningsThe BOS/EOS/thinking/DSML token strings intentionally use fullwidth characters and unusual delimiters to match the DeepSeek V3.2 tokenizer spec. Static-analysis warnings about ambiguous
|and possible “passwords” are expected here and shouldn’t be “simplified” to ASCII|, or behavior will diverge from the model’s encoding.If these warnings are noisy in CI, consider suppressing them via tool configuration rather than altering the tokens.
54-59: Broad exception into_jsonis acceptable copy-from-spec behavior
to_jsoncatches a bareExceptionto fall back fromensure_ascii=Falsetoensure_ascii=True. Given this is copied from the model’s reference implementation and the fallback is conservative, I’d keep the broad catch and, if needed, silence BLE001 via linter config instead of narrowing the exception set.tensorrt_llm/inputs/utils.py (1)
26-29: Import placement and dependency direction look fineImporting
DeepseekV32Tokenizerfromtensorrt_llm.llmapi.deepseek_v32here matches the intended layering (inputs → llmapi) and doesn’t introduce an obvious cycle, givenllmapi.tokenizerdoesn’t depend on inputs.tensorrt_llm/llmapi/deepseek_v32/__init__.py (1)
7-14: Re-export surface looks appropriateExporting
DeepseekV32Tokenizer,encode_messages, andparse_message_from_completion_textvia__all__matches how callers use this package (e.g., imports in inputs/utils.py and llm_args.py) and keeps the public surface focused.tensorrt_llm/llmapi/llm_args.py (1)
1712-1716:tokenizer_modeextension is consistent with CLI surfacesAdding
'deepseek_v32'to thetokenizer_modeLiteral and documenting its use for DeepSeek V3.2 matches the new CLI options in eval/serve and keeps the JSON schema in sync.tensorrt_llm/commands/eval.py (2)
42-47: CLI--tokenizer_modedefinition is aligned with BaseLlmArgsThe new option exposes exactly the supported values (
"auto","slow","deepseek_v32") and clearly documents the DeepSeek-specific mode. This keeps the CLI surface in sync withBaseLlmArgs.tokenizer_mode.
117-134: Propagatingtokenizer_modeintollm_argsis correctAdding
"tokenizer_mode": tokenizer_modewhen buildingllm_argsensures the selected mode reaches both PyTorch and TensorRT backends via BaseLlmArgs, matching the new tokenizer initialization logic.tensorrt_llm/commands/serve.py (3)
81-107: Extendingget_llm_argswithtokenizer_modeis consistent and backwards compatibleAdding the
tokenizer_mode: str = "auto"parameter and threading it into thellm_argsdict lets bothserveand disaggregated flows control tokenizer initialization without breaking existing callers (they either pass it explicitly or fall back to"auto").
253-264: Serve CLI--tokenizer_modematches eval and llm_argsThe new option exposes the same set of choices as eval (
"auto","slow","deepseek_v32") with a clear help string. This keeps server-side configuration aligned withBaseLlmArgs.tokenizer_mode.
421-454: Passingtokenizer_modethrough toget_llm_argscorrectly wires server behaviorPropagating the CLI
tokenizer_modeargument intoget_llm_argsensures the LLM instance used by the server honors DeepSeek V3.2 tokenization when requested, while leaving existing defaults unchanged.
|
/bot run |
|
PR_Github #27801 [ run ] triggered by Bot. Commit: |
|
PR_Github #27801 [ run ] completed with state |
|
/bot run |
|
PR_Github #27920 [ run ] triggered by Bot. Commit: |
|
PR_Github #27920 [ run ] completed with state |
|
/bot run |
|
PR_Github #28056 [ run ] triggered by Bot. Commit: |
|
PR_Github #28056 [ run ] completed with state |
|
/bot run |
|
PR_Github #28321 [ run ] triggered by Bot. Commit: |
|
PR_Github #28321 [ run ] completed with state |
|
/bot run |
|
PR_Github #28450 [ run ] triggered by Bot. Commit: |
|
PR_Github #28450 [ run ] completed with state |
|
PR_Github #28826 [ run ] triggered by Bot. Commit: |
|
PR_Github #28826 [ run ] completed with state
|
|
/bot run |
|
PR_Github #28832 [ run ] triggered by Bot. Commit: |
Signed-off-by: Chang Liu (Enterprise Products) <9713593+chang-l@users.noreply.github.com>
Signed-off-by: Chang Liu (Enterprise Products) <9713593+chang-l@users.noreply.github.com>
Signed-off-by: Chang Liu (Enterprise Products) <9713593+chang-l@users.noreply.github.com>
Signed-off-by: Chang Liu (Enterprise Products) <9713593+chang-l@users.noreply.github.com>
Signed-off-by: Chang Liu (Enterprise Products) <9713593+chang-l@users.noreply.github.com>
Signed-off-by: Chang Liu (Enterprise Products) <9713593+chang-l@users.noreply.github.com>
Signed-off-by: Chang Liu (Enterprise Products) <9713593+chang-l@users.noreply.github.com>
c1faa60 to
a68b52c
Compare
|
/bot run |
|
PR_Github #29011 [ run ] triggered by Bot. Commit: |
|
PR_Github #29011 [ run ] completed with state
|
|
/bot run |
|
PR_Github #29031 [ run ] triggered by Bot. Commit: |
|
PR_Github #29031 [ run ] completed with state
|
|
/bot run |
|
PR_Github #29060 [ run ] triggered by Bot. Commit: |
|
PR_Github #29060 [ run ] completed with state |
Signed-off-by: Chang Liu (Enterprise Products) <9713593+chang-l@users.noreply.github.com> Signed-off-by: lkomali <lkomali@nvidia.com>
Signed-off-by: Chang Liu (Enterprise Products) <9713593+chang-l@users.noreply.github.com>
Signed-off-by: Chang Liu (Enterprise Products) <9713593+chang-l@users.noreply.github.com>
Signed-off-by: Chang Liu (Enterprise Products) <9713593+chang-l@users.noreply.github.com>
Signed-off-by: Chang Liu (Enterprise Products) <9713593+chang-l@users.noreply.github.com> Signed-off-by: Daniil Kulko <kulkodaniil@gmail.com>
Created
tensorrt_llm/llmapi/deepseek_v32/for deepseek v3.2 tokenizer/chat_template and encoding functionsUsage:
In addition to DeepSeek-V3.2-Exp (already supported), simply custom tokenizer flag if deploying with HF/DeepSeek-V3.2:
Evaluation:
Summary by CodeRabbit
Release Notes
--tokenizer_modeCLI option (choices:auto,slow,deepseek_v32; default:auto) for eval and serve commands✏️ 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.