已合并
fix: 在cpu侧增加对bf16类型的数据校验 #2982
maohp_hw创建于 6月6日
fix: 在cpu侧增加对bf16类型的数据校验 #2982
已合并
Pull Request已成功合入, 合并人@CANN-robot
(感谢 maohp_hw 的贡献)6月6日 添加了label:cann-cla/yes
CANN-robot
6月6日 评论:
6月6日 评论:
CANN-robot
6月6日 评论:
6月6日 评论:
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 |
|---|---|---|
| impl/basic_api | ✅ chenyiyuan, bianque (2/2) | ✅ chenyiyuan (1/1) |
| repo-cann/asc-devkit | ✅ chenyiyuan, bianque (2/2) | ✅ chenyiyuan (1/1) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
haipingmao, thanks for your pull request. All authors of the commits have signed the CLA. 👍


6月6日 修改了pull request 的描述
此处折叠了96条消息 查看更多
6月8日 添加了label:ci-pipeline-passed
6月8日 添加了label:lgtm
6月8日 关闭了关联的issue
6月8日 合入了pull request
描述
在CPU模式下,
TransDataTo5HDAPI的数据类型校验函数CheckTransDataTo5HDParams缺少对bfloat16_t类型的支持,导致使用bf16数据类型时触发错误的类型检查失败。这使得在CPU模式下执行examples/01_simd_cpp_api/02_features/03_basic_api/02_memory_vector_compute/transpose样例(输入改为bfloat16_t类型)会出现报错。根本原因
CheckTransDataTo5HDParams函数中的SupportType模板参数列表未包含bfloat16_t类型,当用户传入bf16类型数据时,会触发类型检查错误:bfloat16_t解决方案
在
impl/basic_api/kernel_operator_vec_transpose_intf_impl.h文件中:CheckTransDataTo5HDParams函数的类型检查列表中添加bfloat16_t类型(具体修改在第60行,其余均为clang-format带来的格式调整)bfloat16_t添加到支持的类型列表中.pre-commit-config.yaml进行格式化调整关联的Issue
关联Issue #885
测试
Compile通过;
transpose.asc样例在CPU模式下执行通过。
文档更新
NA
类型标签