已合并
fix(example): rename NPU_ARCH to NPU_SOC_VERSION and dynamically adapt Python version tag #7520
fix(example): rename NPU_ARCH to NPU_SOC_VERSION and dynamically adapt Python version tag #7520
已合并
huang-chuhong创建于 6月25日
huang-chuhong成员
6月25日

描述

fast_kernel_launch_example 示例工程中 NPU_ARCH 变量命名与社区规范不一致,且 README 缺少编译款型说明,setup.py 中 wheel 构建的 Python 版本标签硬编码为 cp38,与 README 文档描述不一致。

本次改动将 NPU_ARCH 全量重命名为 NPU_SOC_VERSION,并在 README 中补充编译款型说明;同时 wheel Python 版本标签从硬编码 cp38 改为动态适配。

改动

  • CMakeLists.txt: NPU_ARCH 重命名为 NPU_SOC_VERSION
  • cmake/func.cmake: NPU_ARCH 重命名为 NPU_SOC_VERSION
  • README.md: 新增 NPU_SOC_VERSION 编译款型说明(ascend910b / ascend910_93 / ascend950)
  • setup.py: Python 版本标签从硬编码 cp38 改为 f"cp3{sys.version_info.minor}";NPU_ARCH 重命名为 NPU_SOC_VERSION
  • csrc/moe_distribute_combine_v2/ascend910_93/README.md: NPU_ARCH 重命名为 NPU_SOC_VERSION
  • csrc/moe_distribute_dispatch_v2/ascend910_93/README.md: NPU_ARCH 重命名为 NPU_SOC_VERSION

关于 abi3 兼容性的说明

本项目为 example 示例工程,用户根据自身环境自行构建 wheel 并安装,不存在跨版本分发场景。动态标签使产物名与 README 文档描述一致,用户构建即用,不影响实际使用。

关联的Issue

#3310

测试

  • Python 3.8 环境构建产物标签为 cp38,Python 3.12 环境构建产物标签为 cp312,与文档描述一致
  • 不传 NPU_SOC_VERSION 时默认 ascend910b,行为不变

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 huang-chuhong 的贡献)
Hhuang-chuhong成员
6月25日 创建了 pull request,commit 129c9e61
CANN-robotCANN-robot成员
6月25日 添加了label:cann-cla/yes
CANN-robot
CANN-robot成员
6月25日 评论:

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


PR Approval Progress

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

Module Approval Details

module lgtm status approve status
*/*/README.md 吴瑶, 蒋礼锐 (2/2) 吴瑶 (1/1)
examples 蒋礼锐, xtqh (2/2) 蒋礼锐 (1/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
Hhuang-chuhong成员
6月25日 修改了pull request 的描述
huang-chuhong成员
6月25日 评论:

compile

likedislike
此处折叠了81条消息 查看更多
吴瑶成员
6月30日 评论:

/lgtm
/approve

likedislike
xtqh成员
6月30日 评论:

/lgtm

likedislike
jiang-lirui成员
6月30日 评论:

/approve
/lgtm

likedislike
CANN-robotCANN-robot成员
6月30日 添加了label:lgtmapproved
CANN-robotCANN-robot成员
6月30日 合入了pull request