Install
Works with Claude Code, Claude apps, Codex, Cursor, Gemini CLI, GitHub Copilot, VS Code, OpenCode, Goose, Windsurf. Read the repository before you give any tool access to your data.
npx agentmarket install skill/zhangxin8069-pyqcu-benchmark
Asks which of your tools to add it to (Claude Code, Codex, Cursor, VS Code, Windsurf, Gemini CLI, Claude Desktop) and shows the change first. See https://agentmart.dev/cli.
Get the weekly diff
The weekly diff: one email a week with new agent tools, notable updates and grade changes, plus security alerts for tools you follow. Double opt-in, one-click unsubscribe.
About
Reviews
Write a reviewNo reviews yet. Installed it? Reviews come from verified installers only. How reviews work
Permissions
What this skill can do and what it asks for, from its SKILL.md and code. Checked Oct 26, 2026.
- Tools
- No tools found
- Secrets
- None asked for
- Install scripts
- None found
Network hosts it talks to 1
codeload.github.com· found in install command
Files it touches
~/.claude/skills/pyqcu-benchmark
What's inside
- Skill name
pyqcu-benchmark- Description
- 当需要运行或解释 PyQCU/QCU/QUDA 性能基准、公平计时、显存或容量证据时使用。
- License
- MIT
- Instructions
- 439 lines in SKILL.md · view on GitHub
Files (3)
- AGENTS.md
- SKILL.md
- qcu-multigrid-20261023.md · references/
SKILL.md (first lines)
# pyqcu/testing/benchmark Performance benchmarks comparing PyTorch, TileLang, and C++ CUDA backend implementations. GPU/DCU/GPGPU benchmarks keep one Python process = one MPI rank = one device. `MultiGpuMultigrid` benchmarks are explicit test-only evidence; do not treat their launch shape as the production default. See [`pyqcu-cuda/SKILL.md`](../pyqcu-cuda/SKILL.md#cuda-production-topology). Legacy-MultiGrid is the QCU default solver and the primary development/debug/ optimization benchmark target. Strict-MultiGrid rows are explicit comparison, algorithm-reference, or special-fallback evidence unless a task says otherwise. Legacy hierarchies deeper than two levels emit `MultigridDepthWarning`; Strict hierarchies deeper than three do the same. The same warning also considers the global and rank-local lattice after the process grid and parity compression, the coarsening block, the coarsest volume and whether another stable transition is possible. Do not treat a warning-only run as a valid multi-level result. Record native and independently reconstructed true residuals together, and mark distributed Legacy depth greater than two as unsupported unless a dedicated regression proves both correctness and benefit. MPI benchmarks accept only a positive power of two ranks (`1/2/4/8/...`). Reject every other count before launching MPI or allocating the solver. The complete 2026-10-23 rank, quick-matrix, true-residual and evidence guidance is in [`references/qcu-multigrid-20261023.md`](references/qcu-multigrid-20261023.md); read it before running the QCU MultiGrid matrix. Do not treat MG cache files as interchangeable by filename or size. CUDA/Torch Legacy consume the blocked odd-Schur layout with parity-compressed time (`lonv=[E,e,X,x,Y,y,Z,z,T/2,t]`), while KUPL's native full-time builder emits a different coarse shape. Validate `lonv/hnn/hdg/sit` shapes against the selected backend before setup; fail closed on a mismatch. For a prebuilt odd-Schur cache, the Torch fine operator may use `parity_only=True`, but never enable that mode while the same operator is still needed to construct a Galerkin hierarchy. The MPI cache entry is `python -m pyqcu.testing.simple.mpi.build_full_mg_cache`, not the serial parent script. It must run every rank through distributed null-vector construction, assign each rank a disjoint coarse slab, stage only a periodic overlap halo for local stencil evaluation, write all four tensors through HDF5 MPI-IO owned slabs, validate every rank slab against the published HDF5, and publish the manifest atomically. Never root-gather multi-GiB `lonv`; L48 experience also rules out root assembly of `hnn/hdg/sit`. The correct `lonv` patch axes are `(2,4,6,8)`, not the last four tensor axes. Record MPI ranks/grid, per-rank patch extent, slab reconstruction status, and all global tensor SHA256 values. A 2/4-rank cache is functionally equivalent to the 1-rank reference only when tensor-level relative differences are reported; MPI reduction order means bitwise SHA equality must not be required across rank counts. Identity-safe reuse, QUDA fallback, formal matrix scope, figure/speedup rules, required recipe fields, and the real-time document ledger are defined in [`references/qcu-benchmark-contract.md`](references/qcu-benchmark-contract.md). Read it before launching a formal or multi-backend benchmark. Every speedup must show absolute numerator and denominator times with units and sample statistics. 正式三方基准的输入、同窗比较、历史证据和不可外推条件见 [`pyqcu-docs/references/extracted-guidance.md`](../pyqcu-docs/references/extracted-guidance.md#5-性能与证据解释)。 Legacy/Strict CUDA MG 的运行时峰值必须用同时覆盖 C++ 原生分配的独立设备级采样器, 不能只报 PyTorch allocator。现有同输入 c64 两级、`nvec=12` 记录中 Legacy solve 峰值为 0.596/1.533/4.113 GiB,Strict 为 0.789/2.326/6.715 GiB (`8x8x8x16`、`12x12x12x24`、`16x16x16x32`);`24x24x24x64` Strict 缺失。Legacy 同时是 `n_vcycles=0`,所以只能作为当前实际入口的容量证据。详见 [`docs/legacy_vs_strict_mg_memory_20261023.md`](../../docs/legacy_vs_strict_mg_memory_20261023.md)。 这些 JSON 没有 `device_name`,只能确认总显存 `34,359,345,152` bytes;不能用相同 总量代替物理设备身份。Legacy asset-build 另有 `432,013,312`、`1,591,738,368`、 `4,722,786,304` bytes 的三点峰值,它们是独立 setup 阶段,不能与 Strict 全程峰值 拼成同一阶段比较。 ## Files | File | Purpose | |------|---------| | `conftest.py` | Benchmark entry point | | `env.py` | Benchmark environment configuration | ## 2026-10-23 六版本真实输入基准 正式编排入口为 `pyqcu/testing/benchmark/qcu_six_way.py`,隔离 worker 为 `qcu_six_way_worker.py`。默认输入是真实 LIME 的 `8×8×8×16` 前缀,运行 Torch/CUDA/KUPL × Legacy/Strict、QUDA aligned MG,并额外执行 CUDA Legacy fine-only 消融。结果与解释见 [`docs/qcu_six_way_benchmark_20261023.md`](../../docs/qcu_six_way_benchmark_20261023.md)。 所有后端的正确性门固定为 `8×8×8×16`,包括 Torch/CUDA/KUPL × Legacy/Strict 六项 QCU-MG;`16×16×16×16` 及更大格点只能用于性能、容量或历史数据验证。 合格批次还必须包含 同输入的 QUDA aligned MG 以及 Torch/CUDA/KUPL/QUDA BiCGStab 边界对照。正式矩阵只用 trace-off,并在进程启动前设置 `QUDA_ENABLE_TUNING=0`;trace-on 只能单独用于诊断。 详细执行与证据口径见 [`references/qcu-multigrid-20261023.md`](references/qcu-multigrid-20261023.md)。 不得由 `levels`、`restart` 或 cycle 配置推断 coarse 已执行。每个 Legacy side 必须读取 `n_vcycles`、`coarse_iters`/`coarse_iterations` 和实际 cycle/correction 计数;多 rank CUDA 未显式设置 `params[_MG_USE_DEFLATE_]` 时结果为 fine-only,不能标成 coarse MG。 QUDA GCR-MG on the A100 native-LAPACK build was made usable with `nvec=12`, 2 levels, `mg_block=2^4`, and `--no-mma`. MMA failed differently by path: `nvec=24` exhausted A100 memory, while `nvec=12` requested unsupported coarse color `N=24`. The working no-MMA L32 comparison uses internal null-vector setup and should be reported as a GCR-MG entry-point comparison, not as an identical Legacy cycle. L32 medians are QUDA `0.482426/0.314393/0.287465 s` versus CUDA Legacy `0.214456/0.219506/0.218343 s` for 1/2/4 ranks; all three pass independent full residuals. 本轮确认的三个硬边界: - CUDA Legacy 在同一 `LatticeSet` 上连续 cold solve 会污染后续 RHS/状态;正式样本必须 在计时前重建运行时,重建时间单独记录,不能把后端自报残差当作末次解的正确性证据。 - KUPL Strict 的 public 与 raw ABI 已完成对齐;可用的正式入口应使用 `--kupl-strict-abi both` 交叉校验两条路径。仍不得只验证 raw ABI 就宣称其他公共 wrapper 可用,ABI 差异必须 fail closed。 - sm70 QUDA 构建为 `QUDA_QIO=OFF`。缺少共享 QIO null-vector 时,QUDA 只能在同 gauge 上 自生成 null space;该结果可作同配置算法对照,不能写成 byte-identical null-basis replay。 Capacity-bound residual validation must run after native teardown. End the `LatticeSet`, close the MG hierarchy, delete cache/asset owners and any bound method closure that references the hierarchy, run GC/allocator cleanup, then construct a fresh Clover/operator for the independent full residual. Computing
From ZhangXin8069/PyQCU, MIT.
More from ZhangXin8069/PyQCU
- 0.611score
pyqcu-docs
ZhangXin8069
当需要定位 PyQCU 的权威项目文档、把 docs/ 内容提取或同步到 skills/、查询安装/ 环境/维度/测试入口、判断正式文档与阶段报告的生命周期,或追踪 CUDA、MultiGrid、 KUPL、benchmark 与 profiler 知识来源时使用。
SkillAFreshness: A★ 4Claude Code +9 - 0.608score
pyqcu-report
ZhangXin8069
当用户要求制作或修改 PyQCU 中文横版 Beamer、竖版完整讲稿或同源 PPTX, 或说“做汇报 PPT”“生成讲稿”“横版改 LaTeX”“补充公式/算法页”时使用。 纯性能基准、算法分析或代码修复任务不使用本技能。
SkillAFreshness: A★ 4Claude Code +9 - 0.606score
pyqcu-kupl
ZhangXin8069
当维护或验证 cpp/kupl/qcu、pyqcu.kupl、pyqcu/testing/kupl,处理鲲鹏/NUMA CPU 版 QCU,MPI+OpenMP Wilson/Clover dslash、Clover BiStabCG、csw、 Wilson BiStabCG/CG、3D…
SkillAFreshness: A★ 4Claude Code +9 - 0.606score
pyqcu-md-tex-sync
ZhangXin8069
{除非用户明确要求,否则不启用}。仅当当前用户明确点名 `pyqcu-md-tex-sync` / `~pyqcu-md-tex-sync`(或全局 `md-tex-sync`),或明确要求 Markdown 与 LaTeX/PDF 同源维护、双格式同步交付、全文全集与全附件归档时使用;普通…
SkillAFreshness: A★ 4Claude Code +9 - 0.603score
pyqcu-api
ZhangXin8069
当任务涉及 pyqcu.api、后端无关配置/结果/能力/资产 manifest、公共 Protocol 或 Multigrid.solve_result 兼容层时使用。
SkillAFreshness: A★ 4Claude Code +9 - 0.603score
pyqcu-cpp-qcu-python
ZhangXin8069
当任务涉及 cpp/cuda/qcu/python、C API、qcu_api.pxd、qcu.pyx 或 qcu.pyi 同步时使用。
SkillAFreshness: A★ 4Claude Code +9 - 0.603score
pyqcu-cpp-qcu
ZhangXin8069
当任务涉及 cpp/cuda/qcu 的 CUDA 内核、MPI halo、MultiGrid 或 C++ 参数与显存生命周期时使用。
SkillAFreshness: A★ 4Claude Code +9 - 0.603score
pyqcu-cuda
ZhangXin8069
当任务涉及 pyqcu.cuda、libqcu.so Cython 桥、params/argv/set_ptrs ABI 或 CUDA 显存生命周期时使用。
SkillAFreshness: A★ 4Claude Code +9 - 0.603score
pyqcu-form
ZhangXin8069
当用户要求审计或整改 PyQCU 的命名、目录结构、代码框架、文档、日志、数据、 测试布局、仓库清洁度与 Git 交付格式时使用;入口为 `~form` 或 `form`。
SkillAFreshness: A★ 4Claude Code +9 - 0.603score
pyqcu-lattice
ZhangXin8069
当任务涉及 pyqcu.lattice、gamma/Gell-Mann、SU(3) 检查、规范场生成或 Ward 索引时使用。
SkillAFreshness: A★ 4Claude Code +9 - 0.603score
pyqcu-cann
ZhangXin8069
当任务涉及 pyqcu.cann、Ascend/NPU 复数兼容层、force_use_npu 或复数 einsum 分解时使用。
SkillAFreshness: A★ 4Claude Code +9 - 0.603score
pyqcu-dslash
ZhangXin8069
当任务涉及 pyqcu.torch.dslash、Wilson/Clover dslash、hopping/sitting/operator 或奇偶预处理时使用。
SkillAFreshness: A★ 4Claude Code +9
Signals
- Stars
- 4
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 23, 2026 (5 days ago)
From GitHub (fetched Oct 24, 2026).
Details
- License
- MIT
- Repository
- github.com/ZhangXin8069/PyQCU
- First seen
- Oct 24, 2026
- Last checked
- Oct 24, 2026
- Source
- GitHubgithub-graphql
More from ZhangXin8069
- 0.611score
pyqcu-docs
ZhangXin8069
当需要定位 PyQCU 的权威项目文档、把 docs/ 内容提取或同步到 skills/、查询安装/ 环境/维度/测试入口、判断正式文档与阶段报告的生命周期,或追踪 CUDA、MultiGrid、 KUPL、benchmark 与 profiler 知识来源时使用。
SkillAFreshness: A★ 4Claude Code +9 - 0.608score
pyqcu-report
ZhangXin8069
当用户要求制作或修改 PyQCU 中文横版 Beamer、竖版完整讲稿或同源 PPTX, 或说“做汇报 PPT”“生成讲稿”“横版改 LaTeX”“补充公式/算法页”时使用。 纯性能基准、算法分析或代码修复任务不使用本技能。
SkillAFreshness: A★ 4Claude Code +9 - 0.606score
pyqcu-kupl
ZhangXin8069
当维护或验证 cpp/kupl/qcu、pyqcu.kupl、pyqcu/testing/kupl,处理鲲鹏/NUMA CPU 版 QCU,MPI+OpenMP Wilson/Clover dslash、Clover BiStabCG、csw、 Wilson BiStabCG/CG、3D…
SkillAFreshness: A★ 4Claude Code +9 - 0.606score
pyqcu-md-tex-sync
ZhangXin8069
{除非用户明确要求,否则不启用}。仅当当前用户明确点名 `pyqcu-md-tex-sync` / `~pyqcu-md-tex-sync`(或全局 `md-tex-sync`),或明确要求 Markdown 与 LaTeX/PDF 同源维护、双格式同步交付、全文全集与全附件归档时使用;普通…
SkillAFreshness: A★ 4Claude Code +9 - 0.603score
pyqcu-cpp-qcu-include
ZhangXin8069
当任务涉及 cpp/cuda/qcu/include、模板化 CUDA 头文件或 define.h/define.py 同步时使用。
SkillAFreshness: A★ 4Claude Code +9 - 0.603score
pyqcu-api
ZhangXin8069
当任务涉及 pyqcu.api、后端无关配置/结果/能力/资产 manifest、公共 Protocol 或 Multigrid.solve_result 兼容层时使用。
SkillAFreshness: A★ 4Claude Code +9
Cite this page
pyqcu-benchmark skill. Agent Mart. https://agentmart.dev/skills/zhangxin8069-pyqcu-benchmark (last updated 2026-10-24)