已合并
feat: 新增分布式计算章节实验 #781
feat: 新增分布式计算章节实验 #781
已合并
theorycs创建于 14 天前
theorycs
theorycs
14 天前

描述

在“面向高性能计算的数据结构”课程第3章“分布式计算”中,新增4个分布式计算实验。

本次新增实验包括:

  • 03.01 基于HCCL的分布式字符串词频统计实验
    基于HCCL集合通信实现分布式字符串词频统计,通过多设备协同完成数据划分、局部统计与结果聚合。
  • 03.02 基于一致性哈希环的分布式哈希表模拟实验
    实现一致性哈希环及分布式哈希表的数据映射过程,模拟节点加入、退出时的数据重新分布与局部迁移。
  • 03.03 分布式B+树结构动态更新与局部数据迁移实验
    模拟分布式B+树的数据组织与动态更新过程,实现节点变化场景下的索引调整及局部数据迁移。
  • 03.04 基于HCCL的稀疏图分片与全局度数统计实验
    基于CSR结构组织图数据,并结合HCCL完成多设备间的图分区信息通信与结果聚合。

关联的Issue

无。

测试

  • Notebook已在华为在线Notebook环境完整执行通过;
  • CPU版本和NPU版本均能够正常编译和运行;
  • 已验证CANN9.0.0、Ascend 910B4环境;
  • 已验证CANN 8.5.0、Ascend 910B3环境;
  • Notebook能够生成完整的CPU和NPU工程代码。

文档更新

  • 新增:
    1. contrib/tutorials/data_structure_for_hpc/03_distributed_computing/03.01_inclass_hccl_string_statistics.ipynb
    2. contrib/tutorials/data_structure_for_hpc/03_distributed_computing/03.02_extra_consistent_hash_table.ipynb
    3. contrib/tutorials/data_structure_for_hpc/03_distributed_computing/03.03_extra_distributed_bplus_tree.ipynb
    4. contrib/tutorials/data_structure_for_hpc/03_distributed_computing/03.04_extra_hccl_csr_graph_partition.ipynb
  • 更新:
    • contrib/tutorials/data_structure_for_hpc/README.md
  • README中新增第3章4个实验的课程入口。

类型标签

其他信息

无。

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 theorycs 的贡献)
theorycstheorycs
14 天前 创建了 pull request,commit 9cd21e4f
atomgit-bot
atomgit-bot
14 天前 评论:

🤖 正在生成合并请求摘要,请稍候…

likedislike
CANN-robot
CANN-robot成员
14 天前 评论:

Hi @theorycs, welcome to submitting your first PR to cann-learning-hub!

PR Merge Steps

1. CLA Signing

If the current PR label includes cann-cla/yes, it means you have signed the CLA and can proceed to the next step. If the label includes cann-cla/no, please sign the CLA first. If you have any questions, please refer to the FAQ.

2. CI Check

Please comment /compile to trigger the CI pipeline check. If the CI run is successful, the PR will be tagged with ci-pipeline-passed and you can proceed to the next step. If the CI run fails, the PR will be tagged with ci-pipeline-failed, please check the CI logs to fix the issues in the PR. If you have any questions, please refer to the FAQ.

3. Code Review

After CI passes, please refer to the PR Approval Progress and proactively @ the committers in the table to review the code. After approval, committers will comment /lgtm and /approve. Once the lgtm and approved labels are successfully added, the PR will be merged automatically.

likedislike
atomgit-bot
atomgit-bot
14 天前 评论:

🤖 AI 代码检视正在进行中,请稍候…

likedislike
CANN-robotCANN-robot成员
14 天前 添加了label:cann-cla/no
CANN-robot
CANN-robot成员
14 天前 评论:

Thanks for your pull-request.
The full list of commands accepted by me can be found at here.
You can get sig-info at here.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
For more, you also can visit HICANN.


PR Approval Progress

Congratulations! All modules have met the lgtm and approve requirements.

Module Approval Details

module lgtm status approve status
repo-cann/cann-learning-hub waimaidaole, zutao (2/2) waimaidaole, zutao (2/1)

💡 Tip:

  • Committer can comment /approve or /lgtm
  • Commenting /approve implies both code review (lgtm) and intent to merge (approve)

CLA Signature Pass

theorycs, thanks for your pull request. All authors of the commits have signed the CLA. 👍

likedislike
atomgit-bot
atomgit-bot
14 天前 评论:

⚠️ 本次变更过大(4 个可审文件、8727 行,预估需 8 轮分片审查),已超出 AI 代码评审的处理范围,本次跳过。建议拆分为更小的 PR 以获得有效评审。

likedislike
atomgit-bot
atomgit-bot
14 天前 评论:

⚠️ 本次变更过大(4 个可审文件、8727 行,预估需 8 轮分片审查),已超出 AI 代码评审的处理范围,本次跳过。建议拆分为更小的 PR 以获得有效评审。

likedislike
theorycs
theorycs
14 天前 评论:

/check-cla

likedislike
CANN-robotCANN-robot成员
14 天前 删除了label:cann-cla/no
CANN-robotCANN-robot成员
14 天前 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
14 天前 评论:

CLA检查已通过,详情可参考这里

likedislike
theorycs
theorycs
14 天前 评论:

/compile

likedislike
theorycstheorycs
14 天前 update merge request[project id: 9260575, iid: 781, commit_id: f296cc2d345695eab0b9c18397a368f389225c83] virtual merging success
CANN-robotCANN-robot成员
14 天前 添加了label:ci-pipeline-running
CANN-robot
CANN-robot成员
14 天前 评论:

流水线任务触发成功
任务链接 [614b1d33c191413ca17be82122baa6db][流水线指导]

任务名称状态日志下载链接
SCA ✅ SUCCESS >>>>>
antipoison ✅ SUCCESS >>>>>
Check_Pr ✅ SUCCESS >>>>>
pre_comment ✅ SUCCESS >>>>>
codecheck_style ✅ SUCCESS >>>>>
pre-commit ✅ SUCCESS

[2026-08-20 12:29:07]    CI执行结束

likedislike
CANN-robotCANN-robot成员
14 天前 删除了label:ci-pipeline-running
此处折叠了5条事件消息 查看更多
theorycstheorycs
14 天前 修改了pull request 的描述
chenmingyu
chenmingyu成员
14 天前 评论:

@theorycs
感谢提交!data_structure_for_hpc 课程第三章分布式计算的 4 个 notebook
已在 CANN 9.1.0 / Ascend 910B3 环境下验证通过,编译运行正常,结果正确。

4 个 notebook 都做了很好的环境自适应设计——单卡环境自动降级到 simulate 仿真模式
验证逻辑正确性,多卡环境使用真机 HCCL,考虑很周到。

以下是验证结果:
验证环境

CANN 9.1.0 / Ascend 910B3 / device 7 / Python 3.11.4

变动文件 5 个:4 个 .ipynb + 1 个 README.md
文件类型均符合规范,无异常文件。
README 新增 4 行章节条目,格式正确,无冲突标记。

Notebook 代码cell 通过 失败 状态 结果验证
03.01 HCCL 字符串词频统计 27 27 0 ✅ PASS result: PASS, mismatch_count: 0
03.02 一致性哈希环 20 20 0 ✅ PASS 迁移比例数据完整正确
03.03 分布式 B+树 22 22 0 ✅ PASS query_result: PASS
03.04 HCCL CSR 图分区 30 30 0 ✅ PASS result: PASS, mismatch_count: 0

说明:

  • 所有 notebook 源码通过 %%writefile 动态生成,符合课程规范
  • 03.01 和 03.04 在单卡环境下自动降级为 simulate 模式,逻辑验证通过
  • 编译、运行、结果校验均无报错

结论

验证通过,可以合入。

感谢您的贡献!

likedislike
meme成员
3 天前 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
3 天前 添加了label:approved
wanzutao
wanzutao成员
3 天前 评论:

/lgtm
/approve

likedislike
CANN-robotCANN-robot成员
3 天前 添加了label:lgtm
CANN-robotCANN-robot成员
3 天前 合入了pull request