Repository navigation
Add patches/README.md and CODEOWNERs for patches/ - #2517
Conversation
Expand the "Working with patches" section to explain: - How fetch_sources.py applies patches by default (--apply-patches and --patch-tag amd-mainline) - How to use save_patches.sh to generate patch files from commits - Technical details about .smrev files and git skip-worktree 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Explain how external repositories (rocm-libraries, rocm-systems) use TheRock's patches in their CI workflows: - The typical CI pattern of checking out TheRock and applying patches - Example workflow snippet from rocm-libraries - Links to actual workflow files - Explanation of the safety valve for handling patch conflicts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
…tion - Show more complete workflow example with numbered steps - Add new section on resolving patch conflicts - Clarify when patches can be deleted vs when they block development - Reword typical workflow description for clarity 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
Expand the incomplete section with comprehensive guidelines: - When patches are acceptable vs when they should NOT be used - Commit message requirements with good/bad examples - Patch lifecycle and maintenance responsibilities - Preference for upstream fixes over patches Emphasizes that patches are strongly discouraged and should be temporary with a plan for removal. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
- Move "Prefer upstream fixes" to top for emphasis - Simplify acceptable use cases for patches - Remove redundant examples and lifecycle subsection - Clarify that patches must be on path to upstream acceptance 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
| ./build_tools/save_patches.sh <base_tag> <project_name> <patch_subdir> | ||
|
|
||
| # Example: Save commits to hipBLASLt since the m/amd-mainline tag | ||
| ./build_tools/save_patches.sh m/amd-mainline hipBLASLt amd-mainline |
There was a problem hiding this comment.
is that m/ supposed to be there?
There was a problem hiding this comment.
Copied from the example in the script itself:
TheRock/build_tools/save_patches.sh
Lines 4 to 7 in 0887429
We've had a long standing TODO there to pull the base commit from git submodule status or equivalent so that argument isn't needed. I often just manually look up what commit I want to stack patches on top of.
|
I will take a look tomorrow as it is already 8pm here. |
| /rocm-systems/ @ROCm/TheRockInfra | ||
|
|
||
| # New patches are strongly discouraged. See patches/README.md. | ||
| /patches/ @ScottTodd |
There was a problem hiding this comment.
shouldn't we be adding more eyes to this than just yourself. at least start with shadowing reviews and eventually ramp up?
There was a problem hiding this comment.
Volunteers are welcome :)
There was a problem hiding this comment.
To add some color here:
-
I want to be careful rolling out CODEOWNERS so we don't diffuse responsibility too much. The current teams set by https://github.com/orgs/ROCm/teams are not fit for use in CODEOWNERS as a review requirement, but that is how https://github.com/ROCm/rocm-libraries/blob/develop/.github/CODEOWNERS is using them. For example:
# CI ownership /.github/ @ROCm/rocm-libraries-reviewers
the "rocm-libraries reviewers" team currently has 28 subteams (e.g. "rocblas reviewers") for a total of ~104 team members.
-
Anyone is encouraged to watch PR discussions and contribute reviews. That won't change with the addition of CODEOWNERS.
-
I like the CODEOWNERS and subscription settings in LLVM:
- https://github.com/llvm/llvm-project/blob/main/.github/CODEOWNERS has individuals
- https://github.com/orgs/llvm/teams uses teams to subscribe to issues via
@tagging and a bot:
|
@ScottTodd overall lgtm intention wise, i would love to understand later few things from the current workflow of system/libraries patches, who owns fixing conflicts if they don't own the patch etc. i will sync with you and others later on that. otherwise just some nit. |
marbre
left a comment
There was a problem hiding this comment.
LGTM, just minor nits + volunteering me as an additional codeowner.
Co-authored-by: Marius Brehler <marius.brehler@gmail.com>
We're getting close to 0 patches across the ROCm projects but we've still had several disruptive patches land recently. I want to keep a closer eye on changes to the patches subdirectory and put some guidelines in place for how the team should be thinking about them. Some highlights from the doc: * Documenting how `fetch_sources.py` applies existing patches * Documenting how `save_patches.sh` saves new patches * Documenting how rocm-libraries and rocm-systems consume patches, resolve/remove patches, and can have their development blocked by patches not applying * A "Rules for creating patches" section that emphasizes that problematic commits should be reverted directly upstream and not patched - open source CI/CD takes priority over closed source CI/CD in open source code --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Marius Brehler <marius.brehler@gmail.com>
We're getting close to 0 patches across the ROCm projects but we've still had several disruptive patches land recently. I want to keep a closer eye on changes to the patches subdirectory and put some guidelines in place for how the team should be thinking about them. Some highlights from the doc: * Documenting how `fetch_sources.py` applies existing patches * Documenting how `save_patches.sh` saves new patches * Documenting how rocm-libraries and rocm-systems consume patches, resolve/remove patches, and can have their development blocked by patches not applying * A "Rules for creating patches" section that emphasizes that problematic commits should be reverted directly upstream and not patched - open source CI/CD takes priority over closed source CI/CD in open source code --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Marius Brehler <marius.brehler@gmail.com>
We're getting close to 0 patches across the ROCm projects but we've still had several disruptive patches land recently. I want to keep a closer eye on changes to the patches subdirectory and put some guidelines in place for how the team should be thinking about them. Some highlights from the doc: * Documenting how `fetch_sources.py` applies existing patches * Documenting how `save_patches.sh` saves new patches * Documenting how rocm-libraries and rocm-systems consume patches, resolve/remove patches, and can have their development blocked by patches not applying * A "Rules for creating patches" section that emphasizes that problematic commits should be reverted directly upstream and not patched - open source CI/CD takes priority over closed source CI/CD in open source code --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Marius Brehler <marius.brehler@gmail.com>
We're getting close to 0 patches across the ROCm projects but we've still had several disruptive patches land recently.
I want to keep a closer eye on changes to the patches subdirectory and put some guidelines in place for how the team should be thinking about them.
Some highlights from the doc:
fetch_sources.pyapplies existing patchessave_patches.shsaves new patches