Skip to content

[None][infra] Skip already-applied patches gracefully in 3rdparty FetchContent#12550

Open
achartier wants to merge 2 commits intoNVIDIA:mainfrom
achartier:skip-patch
Open

[None][infra] Skip already-applied patches gracefully in 3rdparty FetchContent#12550
achartier wants to merge 2 commits intoNVIDIA:mainfrom
achartier:skip-patch

Conversation

@achartier
Copy link
Collaborator

@achartier achartier commented Mar 25, 2026

Summary by CodeRabbit

  • Chores
    • Improved patch application logic in build configuration to detect and skip already-applied patches, preventing duplicate applications and reducing build errors.

Description

Skip already-applied patches gracefully in 3rdparty FetchContent

Original implementation from @yunruis

Test Coverage

N/A

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

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

@achartier achartier requested review from ixlmar and tburt-nv March 25, 2026 21:25
@achartier achartier requested a review from a team as a code owner March 25, 2026 21:25
@achartier
Copy link
Collaborator Author

/bot run

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 25, 2026

📝 Walkthrough

Walkthrough

The patch-application logic in the CMake build system is refactored to detect if a patch is already applied before attempting to apply it. A dry-run reverse patch is performed first; if successful, the patch is skipped. Otherwise, the patch is applied normally.

Changes

Cohort / File(s) Summary
Patch Application Logic
3rdparty/CMakeLists.txt
Modified patch invocation to use bash -c wrapper with pre-flight check. Now performs a dry-run reverse patch test to detect if patch is already applied; skips application if detected, otherwise applies patch with forward mode.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: adding graceful skipping of already-applied patches in 3rdparty FetchContent, which directly matches the core change in the CMakeLists.txt modification.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description follows the required template with a clear description of the change (skipping already-applied patches in 3rdparty FetchContent), test coverage rationale (N/A), and completed checklist.

✏️ 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.

@tensorrt-cicd
Copy link
Collaborator

PR_Github #40377 [ run ] triggered by Bot. Commit: c358729 Link to invocation

@achartier
Copy link
Collaborator Author

@CodeRabbit review

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 25, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@tensorrt-cicd
Copy link
Collaborator

PR_Github #40377 [ run ] completed with state FAILURE. Commit: c358729
/LLM/main/L0_MergeRequest_PR pipeline #31475 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

Link to invocation

Signed-off-by: Aurelien Chartier <2567591+achartier@users.noreply.github.com>
Signed-off-by: Aurelien Chartier <2567591+achartier@users.noreply.github.com>
@achartier
Copy link
Collaborator Author

/bot run

@tensorrt-cicd
Copy link
Collaborator

PR_Github #40398 [ run ] triggered by Bot. Commit: 6efd5da Link to invocation

@tensorrt-cicd
Copy link
Collaborator

PR_Github #40398 [ run ] completed with state SUCCESS. Commit: 6efd5da
/LLM/main/L0_MergeRequest_PR pipeline #31493 completed with status: 'SUCCESS'

CI Report

Link to invocation

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.

2 participants