| name | hpc-code-reviewer |
| description | Code review checklist for parallel code correctness in CUDA, OpenMP, and OpenCL. Use when reviewing LLM-generated parallel code translations, when auditing benchmark source code for correctness issues, when writing the paper's 'common failure modes' section, or when a translated kernel has a subtle VERIFY_FAIL that needs root cause analysis. Covers data races, memory model violations, synchronization bugs, numerical precision issues, and API-specific pitfalls. |
| auto-activate | false |
HPC Code Reviewer
Structured code review for parallel code correctness. Targets CUDA, OpenMP, and OpenCL
code — both human-written benchmark sources and LLM-generated translations.
Trigger: /hpc-code-reviewer or when reviewing parallel code for correctness.
When to use
- Diagnosing VERIFY_FAIL in eval results (subtle correctness bugs)
- Reviewing LLM-generated translations for common parallel programming errors
- Auditing benchmark source code before adding to spec corpus
- Writing paper analysis of failure mode taxonomy
Review Checklist
1. Data Races
CUDA:
OpenMP:
OpenCL:
2. Memory Model Violations
3. Synchronization Bugs
4. Numerical Precision
5. API-Specific Pitfalls
CUDA:
OpenMP:
OpenCL:
6. Translation-Specific Issues
Severity Classification
| Severity | Meaning | Example |
|---|
| P0: Correctness | Wrong results or crash | Data race on output array |
| P1: Portability | Works on some configs, fails on others | Hardcoded warp size (32) |
| P2: Performance | Correct but unnecessarily slow | Critical section around entire loop body |
| P3: Style | Correct but hard to maintain | Preserved CUDA naming in OpenMP code |
Output Format
For each issue found, report:
[P<severity>] <category> — <one-line description>
File: <path>:<line>
Evidence: <relevant code snippet>
Fix: <what the correct code should look like>