pyqcu-cpp-qcu-include
当任务涉及 cpp/cuda/qcu/include、模板化 CUDA 头文件或 define.h/define.py 同步时使用。
Skill by ZhangXin8069
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-cpp-qcu-include
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-cpp-qcu-include
What's inside
- Skill name
pyqcu-cpp-qcu-include- Description
- 当任务涉及 cpp/cuda/qcu/include、模板化 CUDA 头文件或 define.h/define.py 同步时使用。
- License
- MIT
- Instructions
- 61 lines in SKILL.md · view on GitHub
Files (2)
- AGENTS.md
- SKILL.md
SKILL.md (first lines)
# cpp/cuda/qcu/include C++ header files for the CUDA backend. 24 templated headers containing CUDA kernel implementations (kernels are inline in headers). CUDA/GPGPU production topology is one Python process = one MPI rank = one device. The headers remain rank-local; cross-device coordination belongs to MPI. `MultiGpuMultigrid` is a test-only exception. See [`pyqcu-cuda/SKILL.md`](../pyqcu-cuda/SKILL.md#cuda-production-topology). ## Key Headers | Header | Purpose | |--------|---------| | `define.h` | Parameter index constants, block size — must mirror `pyqcu/cuda/define.py` | | `include.h` | 系统/第三方头聚合(`cuda*`/`cublas_v2`/`curand*`/`mpi.h`/`chrono`/…),被 `qcu.h:6` 首先包含 | | `lattice_complex.h` | Complex number arithmetic on GPU | | `lattice_set.h` | Lattice geometry, grid layout, site indexing, private singleton communicator lifecycle for serial patches | | `lattice_cuda.h` | CUDA stream management, device utilities | | `lattice_mpi.h` | MPI halo exchange (blocking `MPI_Sendrecv`) | | `qcu.h` | Top-level include aggregator | | `dslash.h` | Dslash dispatch (Wilson vs Clover) | | `wilson_dslash.h` | Wilson dslash kernel | | `clover_dslash.h` | Clover dslash dispatch | | `lattice_wilson_dslash.h` | Wilson dslash implementation | | `lattice_clover_dslash.h` | Clover dslash implementation | | `bistabcg.h` / `cg.h` | BiCGStab and CG algorithm kernels | | `lattice_wilson_bistabcg.h` / `lattice_wilson_cg.h` | Wilson solver wrappers | | `lattice_clover_bistabcg.h` | Clover BiStabCG solver | | `lattice_sap.h` | SAP(Schwarz 交替过程)`sap_mask_kernel`/`sap_update_kernel` — 5-stream MG 的平滑器;已被 `qcu.h:20` 与 `lattice_clover_multigrid.h:40` 实际包含 | | `lattice_clover_multigrid.h` | Clover multigrid V-cycle(5745 行,5-stream architecture) | | `lattice_multigrid.h` / `multigrid.h` | Multigrid restrict/prolong/coarse-dslash | | `laplacian.h` / `lattice_laplacian.h` | Laplacian operator | | `gauss_gauge.h` | Gaussian gauge field generation | Headers correspond to `.cu` source files in `../src/` that `#include` them and instantiate the templates. Serial overlap patches under a multi-rank world must use the owning `LatticeSet::comm`, not `MPI_COMM_WORLD`. Clover and coarse halo paths therefore use `set_ptr->comm`; newly added halo code must do the same. The singleton communicator is created only for local grid product one and freed in `end()`. ## 参数与 Strict 槽位 - `define.h` 必须与 `pyqcu/cuda/define.py` 镜像:`_PARAMS_SIZE_=58` 是整个 `params` 数组长度,`_MG_PARAMS_SIZE_=8` 是每个 coarse-level 描述块的长度。 - `params[54..57]` 依次为 `_MG_USE_GCR_`、`_MG_USE_DEFLATE_`、`_MG_MU_PRE_`、 `_MG_USE_INIT_GUESS_`;其中 57 是 `fermion_out` 奇半 x0 的 0/1 开关。 - Strict 的 `set_ptrs[60..79]` 按 transition 每四槽存放 `V/raw-Y/Yhat/(X,X^-1)`, `set_ptrs[80]` 存放持久 hierarchy;这些槽位不替代 `params[_SET_INDEX_]` 指向的 `LatticeSet` 槽位。 ## Legacy Clover MultiGrid 性能机制(2026-08-25,dev84) - CUDA Graph 段回放(8 迭代/段)——WSL2 ~300µs/内核执行税的对症解(成本单位是内核个数) - 零拷贝映射内存标量传递 + 守卫标量内核(mg_give_1beta_rp / mg_give_1alpha / mg_give_1omega / mg_give_rx)、单块点积归约 - 粗解热启动 + r0_ref 锚定、SYNC DIET(削减冗余同步)、PROF 剖析计数开关 - `define.h` 同步项:`_MG_USE_DEFLATE_` / `_MG_MU_PRE_` / `_MG_USE_INIT_GUESS_` / `_PARAMS_SIZE_=58` 实测收益(V100,`pyqcu/testing/qcu/multigrid/benchmarks/large_volume/report.md`):粗解向量开销 3246→4ms(~800×)、 V-cycle 156→60ms(2.6×)。 Strict 专用 CUDA kernel 位于 `../src/apply_multigrid_strict.cu`,不是一个额外 头文件;本目录的 `qcu.h` 提供其依赖的公共 CUDA 类型和工具。
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.605score
pyqcu-benchmark
ZhangXin8069
当需要运行或解释 PyQCU/QCU/QUDA 性能基准、公平计时、显存或容量证据时使用。
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-dslash
ZhangXin8069
当任务涉及 pyqcu.torch.dslash、Wilson/Clover dslash、hopping/sitting/operator 或奇偶预处理时使用。
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-api
ZhangXin8069
当任务涉及 pyqcu.api、后端无关配置/结果/能力/资产 manifest、公共 Protocol 或 Multigrid.solve_result 兼容层时使用。
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-cann
ZhangXin8069
当任务涉及 pyqcu.cann、Ascend/NPU 复数兼容层、force_use_npu 或复数 einsum 分解时使用。
SkillAFreshness: A★ 4Claude Code +9 - 0.603score
pyqcu-form
ZhangXin8069
当用户要求审计或整改 PyQCU 的命名、目录结构、代码框架、文档、日志、数据、 测试布局、仓库清洁度与 Git 交付格式时使用;入口为 `~form` 或 `form`。
SkillAFreshness: A★ 4Claude Code +9
Signals
- Stars
- 4
- Forks
- 0
- Open issues
- 0
- Last commit (this folder)
- Oct 22, 2026 (6 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.605score
pyqcu-benchmark
ZhangXin8069
当需要运行或解释 PyQCU/QCU/QUDA 性能基准、公平计时、显存或容量证据时使用。
SkillAFreshness: A★ 4Claude Code +9 - 0.603score
pyqcu-cpp-qcu
ZhangXin8069
当任务涉及 cpp/cuda/qcu 的 CUDA 内核、MPI halo、MultiGrid 或 C++ 参数与显存生命周期时使用。
SkillAFreshness: A★ 4Claude Code +9
Cite this page
pyqcu-cpp-qcu-include skill. Agent Mart. https://agentmart.dev/skills/zhangxin8069-pyqcu-cpp-qcu-include (last updated 2026-10-24)