Skip to content

[TRTLLM-14709][infra] Require packaging>=24.2 for FlashInfer source builds - #17075

Merged
brnguyen2 merged 2 commits into
NVIDIA:mainfrom
brnguyen2:trtllm-14709-packaging-req
Jul 31, 2026
Merged

[TRTLLM-14709][infra] Require packaging>=24.2 for FlashInfer source builds#17075
brnguyen2 merged 2 commits into
NVIDIA:mainfrom
brnguyen2:trtllm-14709-packaging-req

Conversation

@brnguyen2

@brnguyen2 brnguyen2 commented Jul 30, 2026

Copy link
Copy Markdown
Collaborator

Dev Engineer Review

  • Added packaging>=24.2 to requirements.txt for FlashInfer source builds using --no-build-isolation.
  • Addresses setuptools license-expression validation failures without changing other dependencies or public APIs.
  • No test lists or test code were changed.
  • Verdict: sufficient

QA Engineer Review

No test changes.

Description

FlashInfer source installs with --no-build-isolation hard-fail during metadata preparation on environments that ship packaging<24.2 (e.g. NGC PyTorch containers with packaging==24.0): setuptools' license-expression validation (_finalize_license_expression) raises ImportError, because it requires packaging>=24.2.

This was hit during Kimi K3 bring-up, where the documented flow installs a pinned FlashInfer revision from source with --no-build-isolation. TensorRT-LLM has no direct packaging requirement today, so adding a packaging>=24.2 floor to requirements.txt is conflict-free and ensures environments built from TRT-LLM requirements can build FlashInfer from source.

This is Wave A of the feat/kimi_k3 → main staging plan.

Test Coverage

Metadata-only change; validated locally:

  • Grepped all requirements*/constraints*/*.toml files: no other packaging pin exists in the repo, so the floor is conflict-free.
  • Fresh venv: pip install --dry-run "packaging>=24.2" "setuptools<80" resolves cleanly (packaging 26.2 + setuptools 79.0.1).
  • Exercised setup.py's parse_requirements() against the edited requirements.txt: all 90 dependency entries parse as valid requirements, with packaging>=24.2 picked up.
  • On a packaging==24.0 container env, applying the floor was previously verified to make the pinned FlashInfer source build succeed (2026-07-27).
  • Pre-commit hooks pass on the changed file.

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.

…uilds

FlashInfer source installs with --no-build-isolation fail during
metadata preparation when the environment ships packaging<24.2
(e.g. packaging==24.0): setuptools' license-expression validation
(_finalize_license_expression) raises ImportError, since it requires
packaging>=24.2.

TensorRT-LLM has no direct packaging requirement today, so adding the
floor to requirements.txt is conflict-free and ensures environments
built from TRT-LLM requirements can build FlashInfer from source.

Signed-off-by: Brian Nguyen <brnguyen@nvidia.com>
@brnguyen2
brnguyen2 requested a review from a team as a code owner July 30, 2026 18:49
@brnguyen2

Copy link
Copy Markdown
Collaborator Author

/bot run

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: fa3b7059-9d71-40d1-97c0-a54460c00aec

📥 Commits

Reviewing files that changed from the base of the PR and between b5d7a4f and 381b6d2.

📒 Files selected for processing (1)
  • requirements.txt
🚧 Files skipped from review as they are similar to previous changes (1)
  • requirements.txt

Walkthrough

Adds packaging>=24.2 to requirements.txt and documents its use for FlashInfer source builds.

Changes

FlashInfer build dependency

Layer / File(s) Summary
Add packaging constraint
requirements.txt
Adds packaging>=24.2 and documents its FlashInfer source-build purpose.

Estimated code review effort: 1 (Trivial) | ~2 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title follows the required ticket/type format and clearly summarizes the packaging requirement for FlashInfer source builds.
Description check ✅ Passed The description clearly explains the issue, solution, test coverage, and relevant checklist items for this dependency-only change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #62830 [ run ] triggered by Bot. Commit: b5d7a4f Link to invocation

@brnguyen2
brnguyen2 force-pushed the trtllm-14709-packaging-req branch from b5d7a4f to 381b6d2 Compare July 30, 2026 23:13
brnguyen2 added a commit to brnguyen2/TensorRT-LLM that referenced this pull request Jul 30, 2026
…rkaround from Kimi K3 docs

Mirrors main PR NVIDIA#17075: FlashInfer source builds with
--no-build-isolation need packaging>=24.2 for setuptools
license-expression validation, so declare it in requirements.txt and
remove the manual 'pip install -U packaging' step from the Kimi K3
README and deployment guide.

Signed-off-by: Brian Nguyen <brnguyen@nvidia.com>
@brnguyen2

Copy link
Copy Markdown
Collaborator Author

Author notes (preserving context from the original PR description):

  • Why requirements.txt is the right place: setup.py feeds this file into install_requires via parse_requirements(), so the floor applies to environments built from TRT-LLM requirements — which is where the FlashInfer source build runs.
  • Why >=24.2 specifically: it is setuptools' requirement for license-expression validation (_finalize_license_expression), which raises ImportError on older packaging. It is independent of the pinned flashinfer-python wheel version.
  • Validation performed: repo-wide grep confirmed no other packaging pin exists anywhere (requirements*, constraints*, *.toml), so the floor is conflict-free; a clean-venv pip install --dry-run resolves; and setup.py's own parse_requirements() was executed against the edited file (all dependency entries parse, with the new floor picked up once).

@brnguyen2

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #62873 [ run ] triggered by Bot. Commit: 381b6d2 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #62830 [ run ] completed with state ABORTED. Commit: b5d7a4f

Link to invocation

brnguyen2 added a commit to brnguyen2/TensorRT-LLM that referenced this pull request Jul 30, 2026
…rkaround from Kimi K3 docs

Mirrors main PR NVIDIA#17075: FlashInfer source builds with
--no-build-isolation need packaging>=24.2 for setuptools
license-expression validation, so declare it in requirements.txt and
remove the manual 'pip install -U packaging' step from the Kimi K3
README and deployment guide.

Signed-off-by: Brian Nguyen <brnguyen@nvidia.com>
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #62873 [ run ] completed with state SUCCESS. Commit: 381b6d2
/LLM/main/L0_MergeRequest_PR pipeline #50995 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

@brnguyen2

Copy link
Copy Markdown
Collaborator Author

/bot run

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #62921 [ run ] triggered by Bot. Commit: 381b6d2 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #62921 [ run ] completed with state SUCCESS. Commit: 381b6d2
/LLM/main/L0_MergeRequest_PR pipeline #51043 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

@brnguyen2

Copy link
Copy Markdown
Collaborator Author

/bot skip --comment "only sets requirements.txt for flashinfer builds, no functional changes"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63024 [ skip ] triggered by Bot. Commit: 381b6d2 Link to invocation

@brnguyen2
brnguyen2 enabled auto-merge (squash) July 31, 2026 11:35
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63024 [ skip ] completed with state ABORTED. Commit: 381b6d2

Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63042 [ skip ] triggered by Bot. Commit: 381b6d2 Link to invocation

@brnguyen2
brnguyen2 disabled auto-merge July 31, 2026 13:56
@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63042 [ skip ] completed with state SUCCESS. Commit: 381b6d2
Skipping testing for commit 381b6d2

Link to invocation

@brnguyen2

Copy link
Copy Markdown
Collaborator Author

/bot skip --comment "only sets requirements.txt for flashinfer builds, no functional changes"

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63058 [ skip ] triggered by Bot. Commit: 5d11588 Link to invocation

@tensorrt-cicd

Copy link
Copy Markdown
Collaborator

PR_Github #63058 [ skip ] completed with state SUCCESS. Commit: 5d11588
Skipping testing for commit 5d11588

Link to invocation

@brnguyen2
brnguyen2 merged commit 72434f8 into NVIDIA:main Jul 31, 2026
7 checks passed
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