rocm/rocm-libraries/hipblaslt-pr-quality
Claude Code and agent skill by rocm/rocm-libraries
- community
Checking that the SKILL.md file is still in the repository.
hipBLASLt supplements to the ROCm PR quality base skill. Use for hipBLASLt PR author, review, or pre-merge gating (target branch develop; product paths under projects/hipblaslt/**, including tensilelite/, and shared/stinkytofu/**, the instruction scheduler and hazard pass that hipBLASLt kernels go through). Adds and tightens base rules; never relaxes a base MUST.
Install
npx vskill@latest install rocm/rocm-libraries/hipblaslt-pr-qualitySKILL.md
The same SKILL.md was published earlier as rocm/rocm-libraries/hipblaslt-pr-quality.
hipBLASLt PR Quality (overlay)
Dependency (mandatory — do this first)
Read and apply the rocm-pr-quality base skill before anything below. It lives in ROCm/TheRock at skills/rocm-pr-quality/ (SKILL.md + reference.md). Since rocm-libraries is a submodule of TheRock, a normal TheRock checkout already has the base present alongside this overlay.
The supplements here only ADD rules or TIGHTEN thresholds. They never relax a base MUST-rule. On any conflict, the base MUST-rule wins.
Scope
- Target branch:
develop. - Product paths:
projects/hipblaslt/**(the hipBLASLt component root, includingtensilelite/)
and shared/stinkytofu/** (stinkytofu, the assembly-level instruction scheduler and hazard pass that TensileLite runs on generated kernels).
- Paths below are written relative to the repo root; in a standalone hipBLASLt checkout they are relative to
projects/hipblaslt/. - Changes outside these (docs, repo tooling) follow the base bar only.
Supplements
Scoping of base rules (adds)
Bind the base change-classes and scope buckets to hipBLASLt paths:
- Frontend / API:
projects/hipblaslt/library/include/hipblaslt/**(public headers),projects/hipblaslt/library/src/**. - TensileLite / kernel generation:
projects/hipblaslt/tensilelite/**, especiallyKernelWriter*.py. - Tests/clients:
projects/hipblaslt/clients/**. - Kernel scheduling and hazard safety:
shared/stinkytofu/**(see thehazard-safetyclass below).
Tightens M1 (defect-fix regression test)
The regression test for a defect fix must run in a shared CI lane (TheRock GitHub Actions or Math CI; not local-only) for the affected gfx arch. A local-only repro does not satisfy M1 for hipBLASLt.
Adds H1 — known-bug two-PR flow
Known-bug entries live in projects/hipblaslt/clients/tests/data/known_bugs.yaml with a tracker id and a time-box. This is the concrete implementation of the base "track and time-box quarantines" requirement. Waiver code `W-KNOWN-BUG` declares a tracked two-PR plan.
Adds — TensileLite test levels (maps the base test-level SHOULD to real lanes)
C++ unit → TensileLite pytest → client/API → integration → perf. Pick the lowest level that fails on the regression. Map the base test-level table onto these lanes when advising or reviewing.
Adds — TensileLite test levels (maps the base test-level SHOULD to real lanes)
C++ unit → TensileLite pytest → client/API → integration → perf. Pick the lowest level that fails on the regression. Map the base test-level table onto these lanes when advising or reviewing.
Adds — characterization snapshot (.ambr golden) discipline
Scope: projects/hipblaslt/tensilelite/tensilelite/Tests/unit/characterization/ — characterization tests that pin TensileLite's current Python behavior as syrupy .ambr goldens, run in the -m unit lane. Green means "behavior unchanged," not "correct"; a red is information about the PR's own change. When a PR's diff touches any .ambr file, gate on all of the below.
- Classify the red first. The author must say which of three a golden change is: (a) an intended
behavior change, (b) a real bug the golden just caught — fix the source, leave the golden alone, or (c) a fragile/non-deterministic test — make it deterministic (e.g. the {basename, err} digest / canonicalization). Never re-record to mask churn, never weaken production source to stabilize a golden, and never delete a failing test to go green.
- Surgical, never blanket. Update goldens only on the smallest affected node
(pytest <node-id> --snapshot-update) and review every .ambr diff line. A blanket pytest -m unit --snapshot-update is forbidden: while CI stays green it blesses real regressions, re-records vacuous goldens nobody read, un-pins deliberately-pinned bugs, and bakes in non-determinism. A PR whose .ambr diff spans many unrelated nodes/files is rejected and re-scoped to the nodes the behavior change actually affects.
- ADR required for pinned or changed behavior. A golden that pins known-wrong behavior, or any
non-obvious golden change, MUST land with an Architecture Decision Record under .../characterization/adr/: one short, append-only file per decision in Nygard form (Status / Context / Decision / Consequences), carrying a Defect: tracker link when a real bug is pinned. ADRs are superseded, not edited in place — if a later fix flips the golden, update the golden and supersede the ADR. (The running catalog of pinned behaviors / accepted mutants stays a registry, e.g. DECISIONS.md, not one ADR each.) A behavior-changing .ambr diff with no matching ADR does not pass review — the concrete hipBLASLt form of the base "document intentional behavior changes" rule.
- Stable-arch goldens are a regression signal. On stable archs (gfx908 / gfx90a / gfx942) a
codegen-digest golden change is a suspected compiler/codegen regression: require explicit root-cause and sign-off (ADR + PR description) before accepting the new golden. Newer, still-churning archs may keep a few compiler generations side by side.
- Re-run before push. After recording, the node is byte-identical on two further
--snapshot-update-free runs, and the full -m unit suite stays green.
References: the characterization README.md ("Snapshot / golden discipline") and the adr/ records.
Adds — gfx CI labels
Component CI vocabulary: ci:gpu:<gfx>, ci:extended, ci:performance. Labels select coverage; they never waive the base test/flag policy. Discover the live label/gfx set from the repo's CI config rather than hardcoding it.
Tightens — device/architecture coverage
Kernel-generation and assembly changes must show coverage on the affected gfx arch(s) in CI, not just host-side tests. Treat a build-only-but-untested arch as uncovered.
Adds — hazard-safety change class (stinkytofu, waits, hazards, scheduling)
Some GPU architectures leave certain register hazards to software. For example, in gfx1250's expert scheduling mode 2 the hardware does not stall an instruction that overwrites a register a matrix instruction is still reading; the compiler must insert an s_wait_alu instead. stinkytofu's wait passes are then the only guard, and a missed wait gives a silently wrong answer, not a crash. Text-matching tests (FileCheck) show what the pass emits; they cannot show that a hazard is covered.
Tag a PR hazard-safety when it adds, removes, weakens or gates a wait or hazard rule, changes the instruction scheduler's dependency handling, or edits instruction or hardware tables. Paths include shared/stinkytofu/**/InsertWaitAluPass*, RemoveWaitAlu*, the waitcnt passes, dag/CDNA5.hpp, HazardRules.hpp, HWModel*, HwReg*, hardware/**/*.def, and rocisa's hazard tables. When unsure, tag it (stricter wins). A hazard-safety PR must have all of:
- A safety argument in the description for each rule it adds, removes, weakens or gates: why the
hazard cannot occur, or why the remaining wait still covers it.
- Execution evidence on the target architecture. Either differential execution (the same kernels
built with and without the change give bitwise-identical results on integer test data) or a small per-rule test kernel run on hardware, with run counts. Host-only ctest and FileCheck results do not satisfy this.
- A test that fails if the protection is removed or the gate is flipped, not only one that matches
today's emitted text.
- The protection on by default (see the M2 tightening below). A gate that weakens a protection
ships with the protection on until the evidence lands.
Missing any of these is BLOCKING. This tightens the base device-coverage rule for this class: a build-only or emulator-only result does not count as coverage.
Tightens M2 — a safe default for a protection is "on"
The base M2 accepts a "safe-default flag." For a new feature the safe default is usually off. For a hazard or correctness protection it is the reverse: the safe default keeps the protection on. A new gate whose default turns a protection off does not satisfy M2. A gate described as temporary or for debugging never merges enabled.
Adds — test-substance smell: assertions on source text
Add to the base smell scan: a test that reads a source file and asserts it contains a string (for example, that Solution.py contains state["ProblemType"]["Sparse"]). It fails only if someone edits that string, so it says nothing about behavior. Treat a hit as BLOCKING, like the base smells.
Tightens — stale-base on high-coupling files
Make the base stale-base check concrete and stricter. High-coupling files: KernelWriter*.py (which already covers KernelWriterAssembly.py), register/SGPR-lifetime code, shared Components/*. Overlap with the base branch on any of these since the PR diverged → mandatory rebase + re-run (base default is strong-recommend).
Tightens — stale-base on validator vs. validated-data (no file overlap)
Some merge-time breakage has no file overlap at all: one PR changes a validator or allow-list while another adds data the validator checks. Treat these as a coupled pair even though they touch different paths. The concrete hipBLASLt instance:
- Validator / allow-list:
projects/hipblaslt/tensilelite/tensilelite/Common/GlobalParameters.py(the
global-parameter registry and the _assertGlobalParametersAreValid ignored-key allow-list), plus the enforcing test projects/hipblaslt/tensilelite/tensilelite/Tests/unit/test_input_yaml_corpus_clean.py.
- Validated data: YAML fixtures under
projects/hipblaslt/tensilelite/tensilelite/Tests/**(e.g.
common/gemm/**).
If, since the PR diverged, the base branch changed the validator/allow-list and this PR adds or edits validated data (or vice-versa), neither PR's own CI can see the collision → mandatory rebase + re-run the strict-corpus test (test_input_yaml_corpus_is_strict_clean) before merge. Generalize the check: when a PR narrows an allow-list/schema, scan the base for in-flight PRs adding data the new rule would reject; when a PR adds validated data, confirm the allow-list/schema on the merge-target still accepts it.
Tightens — approvals
Changes to the high-coupling files above need ≥ 2 hipBLASLt code-owner approvals after the local team review (stricter than a generic base approval count). A hazard-safety PR also needs at least one approval from a reviewer outside the author's immediate team.
Adds — prose and style for written artifacts
When writing the PR description, review comments, handoffs, or design notes, apply the style guide in `prose-style-context.md` (same directory). It sets the reader model, length limits, the sentence-level gate, warning-word list, and the evidence/scope discipline for prose. It governs how findings are written; it never relaxes a base or overlay MUST-rule.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingprojects/hipblaslt/skills/hipblaslt-pr-quality/SKILL.md
Popularity
- Repository stars
- 441
- Repository forks
- 420
- 7-day trend score
- 30
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/rocm/rocm-libraries/hipblaslt-pr-quality)