已合并
fix example #5449
fix example #5449
已合并
watermelon_milk创建于 8 天前
8 天前

描述

修复example样例问题

关联的Issue

测试

文档更新

类型标签

likedislike
Pull Request已成功合入, 合并人@CANN-robot
(感谢 watermelon_milk 的贡献)
Wwatermelon_milk
8 天前 创建了 pull request,commit 6d4e987a
atomgit-bot
atomgit-bot
8 天前 评论:

变更摘要

该 PR 主要修复 example 样例代码中与 Tensor API 接口不一致的问题,使示例能够对齐更新后的 API 命名与用法。改动集中于 mmad_mx.ascmmad_tensor_api.asc 两个示例文件,涉及为枚举补全命名空间限定、重命名拷贝 trait 类型与参数字段,以及使用枚举常量替代魔法数字等。

主要改动

  • 补全命名空间限定: 在 mmad_mx.asc 中将 unit_flag_mode::disable 改为 asc::te::unit_flag_mode::disable,显式限定枚举所在的命名空间
  • 重命名拷贝 trait 类型: 在 mmad_tensor_api.asc 中将 copy_gm_to_l1_trait_defaultcopy_l1_to_l0a_trait_defaultcopy_l1_to_l0b_trait_defaultcopy_l0c_to_gm_trait_default 分别重命名为 gm_to_l1_trait_defaultl1_to_l0a_trait_defaultl1_to_l0b_trait_defaultl0c_to_gm_trait_default
  • 重命名 mmad 参数字段: 将 para.cmatrix_init_val 改为 para.init_with_zero,与 mmad_params 的新字段名保持一致
  • 用枚举替代魔法数字: 将 unit_flag 的赋值由字面量 3/2 替换为 unit_flag_mode::enable_update / unit_flag_mode::enable_keep
  • 修正 copy 参数类型: 将 fixpipe_params 改为 l0c_to_gm_params,并将 params.unit_flag = 3 改为 params.unit_flag = unit_flag_mode::enable_update
likedislike
atomgit-bot
atomgit-bot
8 天前 评论:

代码审查

✅ 未发现问题

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

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
docs munanhw, zhanghao_0689, chentianyu19 (3/2) munanhw (1/1)
examples munanhw, zhanghao_0689, chentianyu19 (3/2) munanhw (1/1)
repo-cann/asc-devkit chentianyu19, zhanghao_0689 (2/2) zhanghao_0689, chentianyu19 (2/1)

💡 Tip:

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

CLA Signature Pass

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

likedislike
此处折叠了56条消息 查看更多
munanhw成员
8 天前 评论:

/approve

likedislike
CANN-robotCANN-robot成员
8 天前 添加了label:approved
CANN-robotCANN-robot成员
8 天前 删除了label:ci-pipeline-running
CANN-robotCANN-robot成员
8 天前 添加了label:ci-pipeline-passed
CANN-robotCANN-robot成员
8 天前 合入了pull request