Skip to content

[TRTLLM-8236][infra] fix platform tag for public wheel - #14616

Merged
niukuo merged 1 commit into
NVIDIA:mainfrom
niukuo:wheel_platform
Jun 4, 2026
Merged

[TRTLLM-8236][infra] fix platform tag for public wheel#14616
niukuo merged 1 commit into
NVIDIA:mainfrom
niukuo:wheel_platform

Conversation

@niukuo

@niukuo niukuo commented May 27, 2026

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • New Features
    • Optional "Kitmaker" dry-run verification after wheel upload, with automatic polling and result checks.
  • Chores
    • Support for a platform-name/tag passed into wheel builds for more accurate platform-specific wheel metadata.
    • Sanity checks updated to include platform tagging in test wiring.
  • Validation
    • Platform-name input is validated to ensure safe values.

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)

  • If PR introduces API changes, an appropriate PR label is added - either api-compatible or api-breaking. For api-breaking, include BREAKING in the PR title.

  • 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

To see a list of available CI bot commands, please comment /bot help.

@niukuo
niukuo requested a review from a team May 27, 2026 04:00
@niukuo
niukuo requested a review from a team as a code owner May 27, 2026 04:00
@niukuo
niukuo requested review from mlefeb01 and yiqingy0 May 27, 2026 04:00
@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: cdedad10-4708-4b92-8281-b3122af26e33

📥 Commits

Reviewing files that changed from the base of the PR and between 02a65b5 and fff0760.

📒 Files selected for processing (2)
  • jenkins/L0_Test.groovy
  • scripts/build_wheel.py

📝 Walkthrough

Walkthrough

Adds optional Kitmaker wheel dry-run to the Jenkins L0 build flow and forwards a new plat_name into wheel packaging. Updates sanity-check tuples with a platformTag slot and extends build_wheel.py with a validated --plat-name argument used during python -m build.

Changes

Kitmaker dry-run + Platform name support

Layer / File(s) Summary
Jenkins: Kitmaker config, helpers, and runLLMBuild changes
jenkins/L0_Test.groovy
Adds KITMAKER_* and RELEASE_SCRIPT_* env-backed constants, pythonVersionFromCpver, runKitmakerWheelDryRun, isKitmakerWheelDryRunEnabled, and checkKitmakerWheelDryRun. Extends runLLMBuild(...) to accept plat_name and kitmaker_dry_run, forwards --plat-name to the wheel build, runs a Kitmaker dry-run publish after upload (unless version_local or disabled), and performs a subsequent check.
Jenkins: sanity-check tuple and callsite updates
jenkins/L0_Test.groovy
Updates the inline "Slots" schema to include a trailing platformTag slot, appends concrete platformTag values to x86 and aarch64 sanity-check config tuples, and updates the sanity-check stage to pass the new tuple slot (values[7]) into runLLMBuild(..., plat_name).
build_wheel.py: add --plat-name CLI and plumbing
scripts/build_wheel.py
Adds --plat-name CLI option with a validator (alphanumerics and underscores), extends main(..., plat_name=None), derives a --config-setting="--build-option=--plat-name={plat_name}" backend argument when provided, and ensures the python -m build invocation uses the derived plat_name argument.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ⚠️ Warning PR description is entirely the template with no custom content added to address the specific changes made to platform tag handling. Add a clear Description section explaining the issue being fixed and the solution. Include Test Coverage section with test details and complete all PR Checklist items explicitly.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: fixing the platform tag for public wheel distribution, directly related to the changeset.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
jenkins/L0_Test.groovy (1)

4235-4288: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

platformTag is configured but never consumed in the sanity-check pipeline.

The new slot is added in configs, but the job logic still only uses indices up to values[6]; values[7] never reaches runLLMBuild, so wheel builds ignore the configured platform tag.

Suggested fix
-            def wheelName = ""
+            def wheelName = ""
+            def platformTag = values[7]
             def cpver = "cp312"
             def pyver = "3.12"
@@
             buildRunner("[${toStageName(values[1], key)}] Build") {
-                wheelName = runLLMBuild(pipeline, cpu_arch, values[3], "", versionLocal, cpver)
+                wheelName = runLLMBuild(pipeline, cpu_arch, values[3], "", versionLocal, cpver, platformTag)
             }

And update runLLMBuild(...) to pass it through:

-def runLLMBuild(pipeline, cpu_arch, reinstall_dependencies=false, wheel_path="", version_local="", cpver="cp312")
+def runLLMBuild(pipeline, cpu_arch, reinstall_dependencies=false, wheel_path="", version_local="", cpver="cp312", platformTag="linux")
@@
-    withCredentials([usernamePassword(credentialsId: "urm-artifactory-creds", usernameVariable: 'CONAN_LOGIN_USERNAME', passwordVariable: 'CONAN_PASSWORD')]) {
-        trtllm_utils.llmExecStepWithRetry(pipeline, script: "#!/bin/bash \n" + "cd tensorrt_llm/ && python3 scripts/build_wheel.py --use_ccache -G Ninja -j ${BUILD_JOBS} -D 'WARNING_IS_ERROR=ON' ${buildArgs}")
+    withCredentials([usernamePassword(credentialsId: "urm-artifactory-creds", usernameVariable: 'CONAN_LOGIN_USERNAME', passwordVariable: 'CONAN_PASSWORD')]) {
+        trtllm_utils.llmExecStepWithRetry(pipeline, script: "#!/bin/bash \n" + "cd tensorrt_llm/ && python3 scripts/build_wheel.py --use_ccache -G Ninja -j ${BUILD_JOBS} -D 'WARNING_IS_ERROR=ON' --platform-tag ${platformTag} ${buildArgs}")
     }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@jenkins/L0_Test.groovy` around lines 4235 - 4288, The configs add a new
eighth slot (platformTag) but the pipeline still reads only up to values[6], so
values[7] is never passed into the build and wheel logic; update the code that
unpacks config arrays (the spot using values[0]..values[6]) to also extract
values[7] as platformTag and thread that platformTag through to any downstream
calls (notably the runLLMBuild invocation) so runLLMBuild receives and uses the
platformTag parameter; also update runLLMBuild's signature/parameters to accept
platformTag and propagate it into the wheel/build steps where platform-specific
behavior is applied.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@scripts/build_wheel.py`:
- Around line 1105-1107: The platform tag (--plat-name) is only added to
extra_wheel_build_args once, so the second python -m build invocation doesn't
receive it; ensure both wheel build calls receive the same plat override by
appending the f' --config-setting="--plat-name={platform_tag}_{arch}"' to
extra_wheel_build_args before any build is executed (or explicitly pass that
string into both build invocations), referencing the existing variables
platform_tag, arch, and extra_wheel_build_args and the two python -m build calls
so both produce the same deterministic wheel filename.
- Around line 1311-1314: The --platform-tag value is interpolated into a shell
command unsafely (from parser.add_argument into a shell=True call); validate or
sanitize platform_tag before using it in any shell invocation by restricting it
to a safe pattern or a whitelist (e.g. allowed values like "linux",
"manylinux_2_28" or a regex such as ^[A-Za-z0-9_\\-]+$), and reject/raise
argparse.ArgumentTypeError for invalid values (or better: avoid shell=True and
build the command as a list). Locate the platform_tag variable from
parser.add_argument and add a validator function (passed as the type in
add_argument or run immediately after parsing) that enforces the whitelist/regex
and returns the sanitized value before any subprocess.run/call where
platform_tag is interpolated.

---

Outside diff comments:
In `@jenkins/L0_Test.groovy`:
- Around line 4235-4288: The configs add a new eighth slot (platformTag) but the
pipeline still reads only up to values[6], so values[7] is never passed into the
build and wheel logic; update the code that unpacks config arrays (the spot
using values[0]..values[6]) to also extract values[7] as platformTag and thread
that platformTag through to any downstream calls (notably the runLLMBuild
invocation) so runLLMBuild receives and uses the platformTag parameter; also
update runLLMBuild's signature/parameters to accept platformTag and propagate it
into the wheel/build steps where platform-specific behavior is applied.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 4e9e6bad-7c16-4278-8202-2fc3f0d57554

📥 Commits

Reviewing files that changed from the base of the PR and between 37079f6 and 2e38273.

📒 Files selected for processing (2)
  • jenkins/L0_Test.groovy
  • scripts/build_wheel.py

Comment thread scripts/build_wheel.py Outdated
Comment thread scripts/build_wheel.py Outdated
@niukuo
niukuo force-pushed the wheel_platform branch 2 times, most recently from a7848bc to 5ff7502 Compare May 27, 2026 04:26
@niukuo

niukuo commented May 27, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --skip-test

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #50454 [ run ] triggered by Bot. Commit: 505e41e Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #50454 [ run ] completed with state FAILURE. Commit: 505e41e
/LLM/main/L0_MergeRequest_PR pipeline #39973 (Partly Tested) completed with status: 'FAILURE'

CI Report

⚠️ 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

CI Agent Failure Analysis

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #50486 [ run ] triggered by Bot. Commit: 505e41e Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #50486 [ run ] completed with state FAILURE. Commit: 505e41e
/LLM/main/L0_MergeRequest_PR pipeline #39994 (Partly Tested) completed with status: 'FAILURE'

CI Report

⚠️ 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

CI Agent Failure Analysis

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #50499 [ run ] triggered by Bot. Commit: 1bb225c Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #50520 [ run ] triggered by Bot. Commit: ea3d86b Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #50499 [ run ] completed with state ABORTED. Commit: 1bb225c

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #50520 [ run ] completed with state SUCCESS. Commit: ea3d86b
/LLM/main/L0_MergeRequest_PR pipeline #40028 (Partly Tested) completed with status: 'SUCCESS'
Pipeline passed with automatic retried tests. Check the rerun report for details.

CI Report

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #50560 [ run ] triggered by Bot. Commit: 8d3da7f Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #50560 [ run ] completed with state FAILURE. Commit: 8d3da7f
/LLM/main/L0_MergeRequest_PR pipeline #40060 (Partly Tested) completed with status: 'FAILURE'

CI Report

⚠️ 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

CI Agent Failure Analysis

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #50567 [ run ] triggered by Bot. Commit: 8d3da7f Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #50567 [ run ] completed with state SUCCESS. Commit: 8d3da7f
/LLM/main/L0_MergeRequest_PR pipeline #40068 (Partly Tested) completed with status: 'SUCCESS'
Pipeline passed with automatic retried tests. Check the rerun report for details.

CI Report

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #50706 [ run ] triggered by Bot. Commit: 5e33b31 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #50706 [ run ] completed with state FAILURE. Commit: 5e33b31
/LLM/main/L0_MergeRequest_PR pipeline #40189 (Partly Tested) completed with status: 'FAILURE'

CI Report

⚠️ 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

CI Agent Failure Analysis

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #50707 [ run ] triggered by Bot. Commit: 5e33b31 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51097 [ run ] completed with state SUCCESS. Commit: 5c5f2a1
/LLM/main/L0_MergeRequest_PR pipeline #40535 completed with status: 'FAILURE'

CI Report

⚠️ 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

CI Agent Failure Analysis

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51134 [ run ] triggered by Bot. Commit: 5c5f2a1 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51134 [ run ] completed with state SUCCESS. Commit: 5c5f2a1
/LLM/main/L0_MergeRequest_PR pipeline #40571 completed with status: 'FAILURE'

CI Report

⚠️ 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

CI Agent Failure Analysis

Link to invocation

@niukuo

niukuo commented May 30, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51178 [ run ] triggered by Bot. Commit: 5c5f2a1 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51178 [ run ] completed with state FAILURE. Commit: 5c5f2a1
/LLM/main/L0_MergeRequest_PR pipeline #40609 completed with status: 'FAILURE'

CI Report

⚠️ 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

CI Agent Failure Analysis

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51200 [ run ] triggered by Bot. Commit: 5c5f2a1 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51200 [ run ] completed with state FAILURE. Commit: 5c5f2a1
/LLM/main/L0_MergeRequest_PR pipeline #40628 completed with status: 'FAILURE'

CI Report

⚠️ 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

CI Agent Failure Analysis

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51228 [ run ] triggered by Bot. Commit: 5c5f2a1 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51228 [ run ] completed with state SUCCESS. Commit: 5c5f2a1
/LLM/main/L0_MergeRequest_PR pipeline #40651 completed with status: 'SUCCESS'

CI Report

Link to invocation

Comment thread jenkins/L0_Test.groovy Outdated
@niukuo

niukuo commented Jun 2, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --skip-test --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51469 [ run ] triggered by Bot. Commit: fff0760 Link to invocation

@niukuo
niukuo requested a review from tburt-nv June 2, 2026 03:21
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51469 [ run ] completed with state SUCCESS. Commit: fff0760
/LLM/main/L0_MergeRequest_PR pipeline #40875 (Partly Tested) completed with status: 'SUCCESS'
Pipeline passed with automatic retried tests. Check the rerun report for details.

CI Report

Link to invocation

@niukuo
niukuo requested a review from chzblych June 3, 2026 01:08
Comment thread jenkins/L0_Test.groovy Outdated
Signed-off-by: Yiteng Niu <6831097+niukuo@users.noreply.github.com>
@niukuo

niukuo commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator Author

/bot run --skip-test --disable-fail-fast

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51966 [ run ] triggered by Bot. Commit: b6e7328 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #51966 [ run ] completed with state SUCCESS. Commit: b6e7328
/LLM/main/L0_MergeRequest_PR pipeline #41316 (Partly Tested) completed with status: 'SUCCESS'
Pipeline passed with automatic retried tests. Check the rerun report for details.

CI Report

Link to invocation

@niukuo

niukuo commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator Author

/bot skip --comment "sanity check passed"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #52011 [ skip ] triggered by Bot. Commit: b6e7328 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #52011 [ skip ] completed with state SUCCESS. Commit: b6e7328
Skipping testing for commit b6e7328

Link to invocation

@niukuo
niukuo merged commit 023ac82 into NVIDIA:main Jun 4, 2026
7 checks passed
yufeiwu-nv pushed a commit to yufeiwu-nv/TensorRT-LLM that referenced this pull request Jun 4, 2026
Signed-off-by: yufeiwu-nv <230315618+yufeiwu-nv@users.noreply.github.com>
2ez4bz pushed a commit to 2ez4bz/TensorRT-LLM that referenced this pull request Jun 8, 2026
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.

3 participants