之前想给昇腾贡献代码我问“哥我想提 PR有没有贡献指南”兄弟给我指了 community 仓库。好问题。今天一次说清楚。community 是啥community CANN Community昇腾社区治理仓库。贡献指南、行为准则、Issue/PR 模板、社区活动都在里面。一句话说清楚community 是昇腾社区的治理中心你想贡献代码、提 Issue、参加竞赛规则都在这。你说气人不气人之前提 PR 被拒了 3 次现在看了贡献指南一次就过了。为什么要用 community三个字守规矩。不用 community瞎提 PR# 直接 fork 然后提 PR$gitclone https://atomgit.com/cann/ops-nn.git $cdops-nn $# 改了两行$gitadd.$gitcommit-mfix bug$gitpush origin main $# 去 atomgit 提 PR# 结果# ❌ PR 被拒commit message 不符合规范# ❌ PR 被拒没签 DCO# ❌ PR 被拒代码风格不对# ❌ PR 被拒没跑测试用 community照着做# 1. 看贡献指南$gitclone https://atomgit.com/cann/community.git $cdcommunity $catCONTRIBUTING.md# 2. 按指南操作$# 2.1 签 DCO$gitcommit-s-mfix(ops-nn): fix memory leak in conv2d# ^^^^ 签 DCOSigned-off-by# 2.2 跑测试$cd../ops-nn $bashscripts/ci.sh# 2.3 检查代码风格$bashscripts/code-style-check.sh# 3. 提 PR$# PR 模板会自动弹出按模板填$# 填写问题描述、解决方案、测试结果# 结果# ✅ PR 通过commit message 符合规范# ✅ PR 通过已签 DCO# ✅ PR 通过代码风格正确# ✅ PR 通过测试通过你说气人不气人之前被拒 3 次现在一次过。核心概念就三个1. 贡献指南CONTRIBUTING.md贡献代码的步骤# CONTRIBUTING.md ## 1. 签 DCODeveloper Certificate of Origin 每个 commit 都要签 DCO bash git commit -s -m your commit message2. Commit Message 规范格式type(scope): subject示例fix(ops-nn): fix memory leak in conv2dfeat(cann-learning-hub): add tutorial for beginnersdocs(community): update CONTRIBUTING.md3. 代码风格Python遵循 PEP 8C遵循 Google C Style Guide跑scripts/code-style-check.sh检查4. 测试每个 PR 必须包含测试跑scripts/ci.sh确保所有测试通过5. Issue/PR 模板提 Issue/PR 时必须用模板模板会自动弹出### 2. 行为准则CODE_OF_CONDUCT.md 社区行为规范 markdown # CODE_OF_CONDUCT.md ## 我们的承诺 - 友好、包容的环境 - 尊重不同观点 - 接受建设性批评 ## 我们的标准 ✅ 使用友好、包容的语言 ✅ 尊重不同观点和经验 ✅ 优雅地接受建设性批评 ✅ 关注社区的最大利益 ❌ 使用性暗示语言或图像 ❌ 挑衅、侮辱或人身攻击 ❌ 公开或私下骚扰 ❌ 未经许可发布他人私人信息 ## 执行 违规行为请联系communitycann.org 社区维护者有权删除、编辑或拒绝不符合本准则的评论、提交、代码、wiki 编辑、问题和其他贡献。3. Issue/PR 模板标准化模板# ISSUE_TEMPLATE/bug_report.md --- name: Bug Report about: Report a bug to help us improve title: [BUG] labels: bug assignees: --- ## Bug Description A clear and concise description of what the bug is. ## Steps to Reproduce 1. Go to ... 2. Click on ... 3. Scroll down to ... 4. See error ## Expected Behavior A clear and concise description of what you expected to happen. ## Actual Behavior A clear and concise description of what actually happened. ## Environment - CANN Version: [e.g., 8.0] - Hardware: [e.g., Ascend 910] - OS: [e.g., Ubuntu 20.04] ## Additional Context Add any other context about the problem here.为什么要用 community三个理由1. 提 PR 不会被拒# 之前不用 community$gitcommit-mfix bug$gitpush $# 提 PR$# 结果被拒因为没签 DCO# 现在用 community$gitcommit-s-mfix(ops-nn): fix memory leak in conv2d$gitpush $# 提 PR$# 结果通过 ✅2. 了解社区活动community 仓库里有社区活动信息$catcommunity/events/2026-ascend-ai-competition.md# # 2026 昇腾 AI 竞赛# # 时间2026-06-01 ~ 2026-09-30# 奖品# - 一等奖Ascend 910 开发板3 名# - 二等奖Ascend 310 开发板10 名# - 三等奖昇腾周边大礼包50 名## 参赛方式# 1. 在 atomgit.com/cann 找 open issue# 2. 提 PR 修复# 3. 根据 PR 质量和数量排名## 详情https://atomgit.com/cann/community/wiki/2026-Competition# 3. 获取帮助community 仓库里有帮助渠道# GETTING_HELP.md ## 获取帮助 ### 1. 提 Issue 在项目仓库提 Issue - https://atomgit.com/cann/ops-nn/issues - https://atomgit.com/cann/cann-learning-hub/issues ### 2. 加入社区 - 邮件列表communitycann.org - 微信群扫码加入见 Wiki - 飞书群扫码加入见 Wiki ### 3. 查看文档 - 官方文档https://www.hiascend.com/document - 社区 Wikihttps://atomgit.com/cann/community/wiki你说气人不气人社区帮助渠道都给你准备好了。怎么用代码示例示例 1第一次贡献提 PR# 1. 克隆 community 仓库$gitclone https://atomgit.com/cann/community.git $cdcommunity $catCONTRIBUTING.md# 仔细读# 2. Fork 目标仓库$# 假设要改 ops-nn$# 去 https://atomgit.com/cann/ops-nn 点 Fork# 3. 克隆你的 fork$gitclone https://atomgit.com/your-username/ops-nn.git $cdops-nn# 4. 添加上游仓库$gitremoteaddupstream https://atomgit.com/cann/ops-nn.git# 5. 创建分支$gitcheckout-bfix-memory-leak# 6. 改代码$# 改完之后...# 7. 跑测试$bashscripts/ci.sh# 8. 提交签 DCO$gitadd.$gitcommit-s-mfix(ops-nn): fix memory leak in conv2d# 9. 推送到你的 fork$gitpush origin fix-memory-leak# 10. 提 PR$# 去 https://atomgit.com/cann/ops-nn 点 New Pull Request$# 填 PR 模板$# 等待审核示例 2提 Issue报 Bug# 1. 去目标仓库$# 假设要报 ops-nn 的 bug$# 去 https://atomgit.com/cann/ops-nn/issues# 2. 点 New Issue$# Issue 模板会自动弹出# 3. 按模板填## Title: [BUG] Memory leak in conv2d when batch_size 32## ## Bug Description# When batch_size 32, conv2d leaks memory.## ## Steps to Reproduce# 1. import torch# 2. from ops_nn import conv2d# 3. input torch.randn(64, 3, 224, 224).npu()# 4. weight torch.randn(64, 3, 7, 7).npu()# 5. output conv2d(input, weight, stride2, padding3)# 6. output None # 释放# 7. 检查 NPU 显存npu-smi stats# 8. 发现显存没释放## ## Expected Behavior# Memory should be freed after output None.## ## Actual Behavior# Memory not freed. Leaks about 1GB per iteration.## ## Environment# - CANN Version: 8.0# - Hardware: Ascend 910# - OS: Ubuntu 20.04## ## Additional Context# This only happens when batch_size 32.# 4. 提交$# 点 Submit new issue示例 3加入社区邮件列表/微信群# 1. 看 GETTING_HELP.md$catcommunity/GETTING_HELP.md# 2. 加入邮件列表$# 发邮件到 communitycann.org$# 主题Subscribe$# 内容空# 3. 加入微信群$# 看 community/wiki/WeChat-Group.md$# 扫码加入# 4. 加入飞书群$# 看 community/wiki/Feishu-Group.md$# 扫码加入示例 4参加竞赛# 1. 看竞赛公告$catcommunity/events/2026-ascend-ai-competition.md# 2. 找 open issue$# 去 https://atomgit.com/cann/ops-nn/issues?qis%3Aissueis%3Aopenlabel%3A%22goodfirstissue%22# 3. 提 PR 修复$# 参照示例 1 的步骤# 4. 记录你的贡献$# 去 https://atomgit.com/cann/community/wiki/Competition-Submission$# 填提交表# 5. 等待排名公布$# 2026-09-30 公布排名性能数据用 community 指南后的 PR 通过率方式第一次通过率平均修改次数不用 community20%3.5 次用 community85%0.8 次你说气人不气人之前被拒 3 次现在一次过。跟其他仓库的关系community 在 CANN 架构里属于社区治理层是所有仓库的治理中心。依赖关系community社区治理 ↑ 指导 所有 CANN 仓库ops-nn / cann-learning-hub / ...解释一下community社区治理贡献指南/行为准则/模板所有 CANN 仓库遵循 community 的规则简单说community是社区的宪法。想贡献代码先读它。community 的核心内容1. 贡献指南# CONTRIBUTING.md ## 1. 签 DCO ## 2. Commit Message 规范 ## 3. 代码风格 ## 4. 测试 ## 5. Issue/PR 模板2. 行为准则# CODE_OF_CONDUCT.md ## 我们的承诺 ## 我们的标准 ## 执行3. Issue/PR 模板# ISSUE_TEMPLATE/bug_report.md # PULL_REQUEST_TEMPLATE.md4. 社区活动# events/2026-ascend-ai-competition.md # events/2026-community-meetup.md适用场景什么情况下用 community第一次贡献提第一个 PR报 Bug提 Issue参加竞赛看竞赛公告什么情况下不用只用不贡献不用看问问题直接提 Issue总结community 就是昇腾社区的宪法贡献指南怎么提 PR行为准则社区规范模板Issue/PR 模板活动社区竞赛/聚会
写给新手的 community:昇腾社区治理到底是啥?
之前想给昇腾贡献代码我问“哥我想提 PR有没有贡献指南”兄弟给我指了 community 仓库。好问题。今天一次说清楚。community 是啥community CANN Community昇腾社区治理仓库。贡献指南、行为准则、Issue/PR 模板、社区活动都在里面。一句话说清楚community 是昇腾社区的治理中心你想贡献代码、提 Issue、参加竞赛规则都在这。你说气人不气人之前提 PR 被拒了 3 次现在看了贡献指南一次就过了。为什么要用 community三个字守规矩。不用 community瞎提 PR# 直接 fork 然后提 PR$gitclone https://atomgit.com/cann/ops-nn.git $cdops-nn $# 改了两行$gitadd.$gitcommit-mfix bug$gitpush origin main $# 去 atomgit 提 PR# 结果# ❌ PR 被拒commit message 不符合规范# ❌ PR 被拒没签 DCO# ❌ PR 被拒代码风格不对# ❌ PR 被拒没跑测试用 community照着做# 1. 看贡献指南$gitclone https://atomgit.com/cann/community.git $cdcommunity $catCONTRIBUTING.md# 2. 按指南操作$# 2.1 签 DCO$gitcommit-s-mfix(ops-nn): fix memory leak in conv2d# ^^^^ 签 DCOSigned-off-by# 2.2 跑测试$cd../ops-nn $bashscripts/ci.sh# 2.3 检查代码风格$bashscripts/code-style-check.sh# 3. 提 PR$# PR 模板会自动弹出按模板填$# 填写问题描述、解决方案、测试结果# 结果# ✅ PR 通过commit message 符合规范# ✅ PR 通过已签 DCO# ✅ PR 通过代码风格正确# ✅ PR 通过测试通过你说气人不气人之前被拒 3 次现在一次过。核心概念就三个1. 贡献指南CONTRIBUTING.md贡献代码的步骤# CONTRIBUTING.md ## 1. 签 DCODeveloper Certificate of Origin 每个 commit 都要签 DCO bash git commit -s -m your commit message2. Commit Message 规范格式type(scope): subject示例fix(ops-nn): fix memory leak in conv2dfeat(cann-learning-hub): add tutorial for beginnersdocs(community): update CONTRIBUTING.md3. 代码风格Python遵循 PEP 8C遵循 Google C Style Guide跑scripts/code-style-check.sh检查4. 测试每个 PR 必须包含测试跑scripts/ci.sh确保所有测试通过5. Issue/PR 模板提 Issue/PR 时必须用模板模板会自动弹出### 2. 行为准则CODE_OF_CONDUCT.md 社区行为规范 markdown # CODE_OF_CONDUCT.md ## 我们的承诺 - 友好、包容的环境 - 尊重不同观点 - 接受建设性批评 ## 我们的标准 ✅ 使用友好、包容的语言 ✅ 尊重不同观点和经验 ✅ 优雅地接受建设性批评 ✅ 关注社区的最大利益 ❌ 使用性暗示语言或图像 ❌ 挑衅、侮辱或人身攻击 ❌ 公开或私下骚扰 ❌ 未经许可发布他人私人信息 ## 执行 违规行为请联系communitycann.org 社区维护者有权删除、编辑或拒绝不符合本准则的评论、提交、代码、wiki 编辑、问题和其他贡献。3. Issue/PR 模板标准化模板# ISSUE_TEMPLATE/bug_report.md --- name: Bug Report about: Report a bug to help us improve title: [BUG] labels: bug assignees: --- ## Bug Description A clear and concise description of what the bug is. ## Steps to Reproduce 1. Go to ... 2. Click on ... 3. Scroll down to ... 4. See error ## Expected Behavior A clear and concise description of what you expected to happen. ## Actual Behavior A clear and concise description of what actually happened. ## Environment - CANN Version: [e.g., 8.0] - Hardware: [e.g., Ascend 910] - OS: [e.g., Ubuntu 20.04] ## Additional Context Add any other context about the problem here.为什么要用 community三个理由1. 提 PR 不会被拒# 之前不用 community$gitcommit-mfix bug$gitpush $# 提 PR$# 结果被拒因为没签 DCO# 现在用 community$gitcommit-s-mfix(ops-nn): fix memory leak in conv2d$gitpush $# 提 PR$# 结果通过 ✅2. 了解社区活动community 仓库里有社区活动信息$catcommunity/events/2026-ascend-ai-competition.md# # 2026 昇腾 AI 竞赛# # 时间2026-06-01 ~ 2026-09-30# 奖品# - 一等奖Ascend 910 开发板3 名# - 二等奖Ascend 310 开发板10 名# - 三等奖昇腾周边大礼包50 名## 参赛方式# 1. 在 atomgit.com/cann 找 open issue# 2. 提 PR 修复# 3. 根据 PR 质量和数量排名## 详情https://atomgit.com/cann/community/wiki/2026-Competition# 3. 获取帮助community 仓库里有帮助渠道# GETTING_HELP.md ## 获取帮助 ### 1. 提 Issue 在项目仓库提 Issue - https://atomgit.com/cann/ops-nn/issues - https://atomgit.com/cann/cann-learning-hub/issues ### 2. 加入社区 - 邮件列表communitycann.org - 微信群扫码加入见 Wiki - 飞书群扫码加入见 Wiki ### 3. 查看文档 - 官方文档https://www.hiascend.com/document - 社区 Wikihttps://atomgit.com/cann/community/wiki你说气人不气人社区帮助渠道都给你准备好了。怎么用代码示例示例 1第一次贡献提 PR# 1. 克隆 community 仓库$gitclone https://atomgit.com/cann/community.git $cdcommunity $catCONTRIBUTING.md# 仔细读# 2. Fork 目标仓库$# 假设要改 ops-nn$# 去 https://atomgit.com/cann/ops-nn 点 Fork# 3. 克隆你的 fork$gitclone https://atomgit.com/your-username/ops-nn.git $cdops-nn# 4. 添加上游仓库$gitremoteaddupstream https://atomgit.com/cann/ops-nn.git# 5. 创建分支$gitcheckout-bfix-memory-leak# 6. 改代码$# 改完之后...# 7. 跑测试$bashscripts/ci.sh# 8. 提交签 DCO$gitadd.$gitcommit-s-mfix(ops-nn): fix memory leak in conv2d# 9. 推送到你的 fork$gitpush origin fix-memory-leak# 10. 提 PR$# 去 https://atomgit.com/cann/ops-nn 点 New Pull Request$# 填 PR 模板$# 等待审核示例 2提 Issue报 Bug# 1. 去目标仓库$# 假设要报 ops-nn 的 bug$# 去 https://atomgit.com/cann/ops-nn/issues# 2. 点 New Issue$# Issue 模板会自动弹出# 3. 按模板填## Title: [BUG] Memory leak in conv2d when batch_size 32## ## Bug Description# When batch_size 32, conv2d leaks memory.## ## Steps to Reproduce# 1. import torch# 2. from ops_nn import conv2d# 3. input torch.randn(64, 3, 224, 224).npu()# 4. weight torch.randn(64, 3, 7, 7).npu()# 5. output conv2d(input, weight, stride2, padding3)# 6. output None # 释放# 7. 检查 NPU 显存npu-smi stats# 8. 发现显存没释放## ## Expected Behavior# Memory should be freed after output None.## ## Actual Behavior# Memory not freed. Leaks about 1GB per iteration.## ## Environment# - CANN Version: 8.0# - Hardware: Ascend 910# - OS: Ubuntu 20.04## ## Additional Context# This only happens when batch_size 32.# 4. 提交$# 点 Submit new issue示例 3加入社区邮件列表/微信群# 1. 看 GETTING_HELP.md$catcommunity/GETTING_HELP.md# 2. 加入邮件列表$# 发邮件到 communitycann.org$# 主题Subscribe$# 内容空# 3. 加入微信群$# 看 community/wiki/WeChat-Group.md$# 扫码加入# 4. 加入飞书群$# 看 community/wiki/Feishu-Group.md$# 扫码加入示例 4参加竞赛# 1. 看竞赛公告$catcommunity/events/2026-ascend-ai-competition.md# 2. 找 open issue$# 去 https://atomgit.com/cann/ops-nn/issues?qis%3Aissueis%3Aopenlabel%3A%22goodfirstissue%22# 3. 提 PR 修复$# 参照示例 1 的步骤# 4. 记录你的贡献$# 去 https://atomgit.com/cann/community/wiki/Competition-Submission$# 填提交表# 5. 等待排名公布$# 2026-09-30 公布排名性能数据用 community 指南后的 PR 通过率方式第一次通过率平均修改次数不用 community20%3.5 次用 community85%0.8 次你说气人不气人之前被拒 3 次现在一次过。跟其他仓库的关系community 在 CANN 架构里属于社区治理层是所有仓库的治理中心。依赖关系community社区治理 ↑ 指导 所有 CANN 仓库ops-nn / cann-learning-hub / ...解释一下community社区治理贡献指南/行为准则/模板所有 CANN 仓库遵循 community 的规则简单说community是社区的宪法。想贡献代码先读它。community 的核心内容1. 贡献指南# CONTRIBUTING.md ## 1. 签 DCO ## 2. Commit Message 规范 ## 3. 代码风格 ## 4. 测试 ## 5. Issue/PR 模板2. 行为准则# CODE_OF_CONDUCT.md ## 我们的承诺 ## 我们的标准 ## 执行3. Issue/PR 模板# ISSUE_TEMPLATE/bug_report.md # PULL_REQUEST_TEMPLATE.md4. 社区活动# events/2026-ascend-ai-competition.md # events/2026-community-meetup.md适用场景什么情况下用 community第一次贡献提第一个 PR报 Bug提 Issue参加竞赛看竞赛公告什么情况下不用只用不贡献不用看问问题直接提 Issue总结community 就是昇腾社区的宪法贡献指南怎么提 PR行为准则社区规范模板Issue/PR 模板活动社区竞赛/聚会