Thanks for sending an issue! Please fill in the following template to help quickly solve your problem.
在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类型)会出现报错。
两个步骤即可复现此问题:
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
按照"重现步骤"执行对应样例时,出现test pass!
test pass!
按"重现步骤"复现此问题即可出现报错日志。
NA
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 / 必填)
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!Related log / screenshot / 日志 / 截图 (Mandatory / 必填)
按"重现步骤"复现此问题即可出现报错日志。
Special notes for this issue/备注 (Optional / 选填)
NA