Review a hipDNN pull request, branch, or local diff for correctness, API compatibility, provider behavior, resource management, code reuse, and testing coverage/quality.
skillsy install rocm/rocm-libraries@hipdnn-reviewReview hipDNN changes with a code-review stance. Lead with findings, ordered by severity, and ground each finding in file and line references. Prioritize correctness, compatibility, resource ownership, provider behavior, test quality, and maintainability over style-only comments.
Infer the review target from the user request:
origin/develop, then develop.testing, backend, frontend, provider, build, or reuse.Ask the user which change set to review if it cannot be inferred.
Determine the repository root:
git rev-parse --show-toplevel
Inspect changed files:
gh pr view <pr-url> --json title,body,files,additions,deletions,changedFiles,baseRefName,headRefName
gh pr diff <pr-url> --name-only
git diff --name-only <base>...
git diff --stat <base>...
git diff --name-only <base>...<branch-ref>
git diff --stat <base>...<branch-ref>
Save the full diff to a file instead of pasting it into the conversation:
DIFF_FILE=$(mktemp "${TMPDIR:-/tmp}/review.XXXXXX.diff")
Use repository or workspace artifact directories when active instructions require them.
Prefer local source for cross-reference. A review based only on a web page or raw diff has lower confidence unless the user requested diff-only mode.
Read only the files needed to validate the changed behavior and nearby patterns. Prefer rg for call sites, similar implementations, tests, and ownership patterns; fall back to grep if needed.
Do not modify files during review.
Classify changed files before reviewing:
projects/hipdnn/frontend/, projects/hipdnn/python/, public frontend headers, graph/node/attribute wrappers, public C++ or Python API.projects/hipdnn/backend/, descriptors, engines, plugin loading, pack/unpack logic, backend C API.projects/hipdnn/data_sdk/, projects/hipdnn/flatbuffers_sdk/, .fbs schemas, generated-object wrappers.projects/hipdnn/plugin_sdk/, plugin interfaces, ABI/API contracts, behavior notes.dnn-providers/, provider registration, applicability, execution, workspace, external library calls.CMakeLists.txt, cmake/, CMakePresets.json, CI, packaging, scripts.hipDNN CI commonly runs sanitizer-enabled tests. Treat leaks and ownership ambiguity as substantive review issues.
UnPack() returns owning raw pointers; prefer generated helpers returning std::unique_ptr, or wrap manually.delete; it is fragile with assertions, exceptions, and early returns.Testing review is required for every hipDNN review, even when no test files changed. Do not equate "tests were added" with "behavior is covered"; read assertions and map them to changed code paths.
For documentation-only, AI-skill-only, or comment-only changes with no product behavior, focus on validation appropriate to the artifact, such as metadata parsing, link/installability, or dry-run invocation.
Assess:
When the active host and user request permit reviewer delegation, split broad reviews by affected scope bucket and add cross-cutting testing and reuse reviews. If delegation is unavailable, disallowed, or unnecessary, perform a direct single-pass review using the same checklist.
Use this shape:
## Findings
- **Major** `[file:line]` Finding title.
Explain the behavioral risk and why it matters. Include the fix direction when clear.
## Testing Assessment
- Covered: ...
- Missing: ...
- Weak tests: ...
- Recommended: ...
## Open Questions
- ...
## Summary
Briefly summarize the reviewed scope and overall readiness.
If there are no findings, say that clearly and mention residual testing risk.