已关闭
[Bug-Report|缺陷反馈]: asc_mmad入参顺序有误;c_api样例运行失败 #172
maohp_hw创建于  2月27日关闭于  2月27日
maohp_hw
maohp_hw成员
2月27日 创建

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

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

1、asc_mmad接口中入参顺序有误。
2、impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_type.h文件中找不到__aicore__标识符。

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

昇腾硬件型号:910B环境运行c_api样例。
软件环境:CANN 9.0.0

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

运行https://gitcode.com/cann/asc-devkit/blob/master/examples/02_features/02_c_api/00_sync_add/c_api_add.asc样例。

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

1、编译成功;2、asc_mmad样例运行成功。

19:32:10 2026-02-26 19:38:29,297 [ERROR] [47704 MainProcess MainThread] [test_case.py:366]: testcase: capi_adds - capi_adds_operator - capi_adds_operator_int16_t_24576_4_1
19:32:10 2026-02-26 19:38:29,297 [ERROR] [47704 MainProcess MainThread] [test_case.py:367]: reproduce cmd: bash run_smoke.sh -m 0 -t 1 -v ascend910B1 -d capi_adds -c capi_adds_operator_int16_t_24576_4_1
19:32:10 In file included from /var/jenkins_home/workspace/obp_c_api_smoke/smoke_test/ops/capi_adds/capi_adds_operator.cpp:5:
19:32:10 In file included from /usr/local/Ascend/cann/compiler/asc/include/c_api/asc_simd.h:20:
19:32:10 In file included from /usr/local/Ascend/cann/compiler/asc/impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_impl.h:28:
19:32:10 /usr/local/Ascend/cann/compiler/asc/impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_type.h:38:5: error: unknown type name 'aicore'
19:32:10 aicore inline integer_sub_type() = default;
19:32:10 ^
19:32:10 /usr/local/Ascend/cann/compiler/asc/impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_type.h:38:23: error: constructor cannot have a return type
19:32:10 aicore inline integer_sub_type() = default;
19:32:10 ^~~~~~~~~~~~~~~~
19:32:10 /usr/local/Ascend/cann/compiler/asc/impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_type.h:40:5: error: unknown type name 'aicore'
19:32:10 aicore inline integer_sub_type(uint32_t value)
19:32:10 ^
19:32:10 /usr/local/Ascend/cann/compiler/asc/impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_type.h:40:23: error: constructor cannot have a return type
19:32:10 aicore inline integer_sub_type(uint32_t value)
19:32:10 ^~~~~~~~~~~~~~~~
19:32:10 /usr/local/Ascend/cann/compiler/asc/impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_type.h:43:5: error: unknown type name 'aicore'
19:32:10 aicore inline integer_sub_type(int32_t value)
19:32:10 ^
19:32:10 /usr/local/Ascend/cann/compiler/asc/impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_type.h:43:23: error: constructor cannot have a return type
19:32:10 aicore inline integer_sub_type(int32_t value)
19:32:10 ^~~~~~~~~~~~~~~~
19:32:10 /usr/local/Ascend/cann/compiler/asc/impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_type.h:46:5: error: unknown type name 'aicore'
19:32:10 aicore inline operator T() const
19:32:10 ^
19:32:10 /usr/local/Ascend/cann/compiler/asc/impl/c_api/instr_impl/npu_arch_2201/utils_impl/utils_type.h:55:5: error: unknown type name 'aicore'
19:32:10 aicore inline bool operator == (integer_sub_type const &rhs) const
19:32:10 ^

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

likedislike
maohp_hwmaohp_hw成员
2月27日 将 haipingmao 设为负责人
CANN-robotCANN-robot成员
2月27日 关闭了 issue
CANN-robotCANN-robot成员
3月20日 添加了label:resolved