2.2 KiB
2.2 KiB
PR Body Templates
Fill-in-the-blanks templates for optimization PRs. Pick the variant matching your domain, fill in {{PLACEHOLDERS}}, and remove any sections that don't apply.
See your language's pr-body-templates.md for language-specific template variants and placeholder values.
Generic Structure
All PR bodies follow this structure:
{{SUMMARY_BULLETS}}
{{TECHNICAL_DETAILS}}
## Benchmark
### {{PLATFORM_DESCRIPTION}}
{{BENCHMARK_OUTPUT}}
<details>
<summary><b>Reproduce the benchmark locally</b></summary>
{{REPRODUCE_COMMANDS}}
</details>
{{CHANGELOG_SECTION}}
## Test plan
- [x] {{TEST_ITEM_1}}
- [x] {{TEST_ITEM_2}}
Writing Guidelines
Write PR descriptions like a human engineer, not a summarizer:
- Be specific: "Replaces HuggingFace's RTDetrImageProcessor with torchvision transforms to eliminate 110 MiB of duplicate weight loading" — not "Improves memory efficiency of image processing."
- Lead with the technical mechanism, not the benefit. Reviewers want to know WHAT you did, not that it's "an improvement."
- No generic headings like "Summary", "Overview", "Key Changes" unless the PR template requires them. If the change is simple enough for 2 sentences, use 2 sentences.
- Don't over-explain the problem. Assume the reviewer knows the codebase. Explain WHY your approach works, not what the code does line-by-line.
Core Placeholders
| Placeholder | Description | Example |
|---|---|---|
{{SUMMARY_BULLETS}} |
1-3 bullet points: what changed and why. Lead with the technical mechanism. | - Replace per-character regex with str.translate() |
{{TECHNICAL_DETAILS}} |
Why the old version was slow, how the new version works. Assume reviewers know the codebase. Omit if summary bullets suffice. | |
{{PLATFORM_DESCRIPTION}} |
Machine spec + runtime version. | Azure Standard_D8s_v5 — 8 vCPU Intel Xeon Platinum 8473C, 32 GiB RAM |
{{BENCHMARK_OUTPUT}} |
Paste benchmark tool output directly. | |
{{REPRODUCE_COMMANDS}} |
Commands to reproduce the benchmark locally. | |
{{CHANGELOG_SECTION}} |
Changelog entry if the target repo uses one. Omit if not applicable. | |
{{TEST_ITEM_N}} |
Specific test results. | Existing unit tests pass |