shmem-ops-correctness-eval

Executes SHMEM operator case matrices and generates Chinese correctness verification reports.

Updated Sep 15, 2026
One-click install
npx skills add https://github.com/WangWindow/CANN-BatchMatMulMaxsum --skill shmem-ops-correctness-eval-wangwindow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: shmem-ops-correctness-eval
Source: https://github.com/WangWindow/CANN-BatchMatMulMaxsum/tree/main/.agents/skills/shmem-ops-correctness-eval
Command: npx skills add https://github.com/WangWindow/CANN-BatchMatMulMaxsum --skill shmem-ops-correctness-eval-wangwindow

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Verifying the correctness of SHMEM-based operators requires running full case matrices, classifying failures, and validating design invariants, which is error-prone when done ad hoc. This Skill standardizes the execution, result collection, failure classification, and reporting of SHMEM operator correctness verification. ## Core Features & Use Cases - Case Matrix Execution: Runs the full case matrix generated by shmem-ops-testcase-gen via run_case_matrix.py, covering smoke, dtype/shape/PE/engine combinations, tail/chunk boundaries, repeats, and medium-to-large scale cases. - Failure Classification: Categorizes failures as design bugs, code bugs, test bugs, or environment blockers and routes them back to the responsible pipeline stage. - Invariant Verification & Reporting: Validates correctness invariants (PE topology, symmetric allocation, put/get semantics, signal/wait, output visibility, dtype tolerance) and writes a complete Chinese report to docs/correctness_report.md. - Use Case: After compiling a fused SHMEM operator, run this Skill to execute all correctness cases, confirm 100% PASS on non-performance cases, and produce the gated report required before entering code review (Phase 5). ## Quick Start Run the full SHMEM correctness case matrix for my operator and generate the correctness verification report in docs/correctness_report.md.

Frequently Asked Questions about shmem-ops-correctness-eval

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I verify SHMEM operator correctness with a case matrix?

Run python3 scripts/run_case_matrix.py to execute all cases from the generated case matrix, then collect PASS/FAIL results per case. The Skill classifies failures, validates correctness invariants, and writes the full report to docs/correctness_report.md.

What must pass before SHMEM operator code review?

The smoke case must pass, all non-performance correctness cases must achieve 100% PASS or be explicitly deferred with reasons, and correctness invariants must be verified or marked with explanations. Only then can the workflow enter Phase 5 code review.

How are SHMEM correctness failures classified?

Failures are classified into four categories: design bugs routed back to shmem-ops-design, code bugs routed to shmem-ops-code-gen, test bugs fixed in testcase-gen outputs, and environment blockers recorded by the orchestrator without rollback.

Can I skip the case matrix and only run smoke cases?

No. Running only smoke cases is an explicit anti-pattern; Phase 4 is considered incomplete without executing run_case_matrix.py and generating docs/case_matrix_report.md listing every case. Entering Phase 5 without this is prohibited.

What precision standards apply to SHMEM operator verification?

Precision judgment uses OpTypes classification with rtol/atol thresholds and dual-statistic criteria defined in the precision-standard reference. Checker output must include reproducible case IDs, commands, input/output paths, and tolerances.