已关闭
[Bug-Report|缺陷反馈]: CPU模式下transpose.asc样例报错 #885
maohp_hw创建于  6月6日关闭于  6月8日
maohp_hw
maohp_hw成员
6月6日 创建

Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.

Describe the current behavior / 问题描述 (Mandatory / 必填)

在CPU模式下,TransDataTo5HD API的数据类型校验函数 CheckTransDataTo5HDParams 缺少对 bfloat16_t 类型的支持,导致使用bf16数据类型时触发错误的类型检查失败。这使得在CPU模式下执行examples/01_simd_cpp_api/02_features/03_basic_api/02_memory_vector_compute/transpose样例(输入改为bfloat16_t类型)会出现报错。

Environment / 环境信息 (Mandatory / 必填)

  • 硬件:昇腾950DT
  • 软件:2026/06/06前的任意cann-asc-devkit_*.run包

Steps to reproduce the issue / 重现步骤 (Mandatory / 必填)

两个步骤即可复现此问题:

  • 将transpose.asc(路径见"问题描述")中的数据类型改为bfloat16_t,部分代码段:
template <uint32_t INPUT_SZIE, uint32_t N, uint32_t N, uint32_t C, uint32_t H, uint32_t W>
__global__ __vector__ void transpose_custom(GM_ADDR x, GM_ADDR y)
{
	AscendC::TPipe pipe;
    KernelTranspose<bfloat16_t, INPUT_SIZE, N, C, H, W> op; //修改处
    op.Init(x, z, &pipe);
    op.Process();
}
  • 设置SCENARIO_NUM = 3,同时在编译时,切换-DCMAKE_SEC_RUN_MODE=cpu。

Describe the expected behavior / 预期结果 (Mandatory / 必填)

按照"重现步骤"执行对应样例时,出现test pass!

按"重现步骤"复现此问题即可出现报错日志。

Special notes for this issue/备注 (Optional / 选填)

NA

likedislike
maohp_hwmaohp_hw成员
6月6日 添加了label:bug-report
maohp_hwmaohp_hw成员
6月6日 将 haipingmao 设为负责人
CANN-robotCANN-robot成员
6月8日 关闭了 issue
CANN-robotCANN-robot成员
6月8日 添加了label:resolved