Ascend C “hello world” 样例执行报错
收藏回复举报
Ascend C “hello world” 样例执行报错
t('forum.solved') 已解决
发表于2024-12-03 16:58:49
0 查看

版本信息:

HDK版本:23.0.6

cann toolkit:7.0.RC1

算子执行样例链接:samples: CANN Samples - Gitee.com

问题描述:执行run.sh脚本报错

问题现象:

 

[ 83%] Built target kernels_host 

/home/ma-user/hello_world/samples/operator/ascendc/0_introduction/0_helloworld/build/auto_gen/kernels/auto_gen_hello_world.cpp:27:5: error: use of undeclared identifier 'InitDump'; did you mean 'AscendC::InitDump'? 

    InitDump(false, dumpAddr, ONE_CORE_DUMP_SIZE); 

    ^~~~~~~~ 

    AscendC::InitDump 

/home/ma-user/Ascend/ascend-toolkit/latest/tools/tikcpp/tikcfw/impl/dav_c220/kernel_operator_dump_tensor_impl.h:618:24: note: 'AscendC::InitDump' declared here 

__aicore__ inline void InitDump(bool mixFlag, GM_ADDR dumpStartAddr, uint32_t gmLen) 

                       ^ 

1 error generated. 

gmake[5]: *** [CMakeFiles/device_aiv_obj.dir/build.make:63: CMakeFiles/device_aiv_obj.dir/home/ma-user/hello_world/samples/operator/ascendc/0_introduction/0_helloworld/build/auto_gen/kernels/auto_gen_hello_world.cpp.o] Error 1 

gmake[5]: Leaving directory '/home/ma-user/hello_world/samples/operator/ascendc/0_introduction/0_helloworld/build/kernels_aiv_device-prefix/src/kernels_aiv_device-build' 

gmake[4]: *** [CMakeFiles/Makefile2:105: CMakeFiles/device_aiv_obj.dir/all] Error 2 

gmake[4]: Leaving directory '/home/ma-user/hello_world/samples/operator/ascendc/0_introduction/0_helloworld/build/kernels_aiv_device-prefix/src/kernels_aiv_device-build' 

gmake[3]: *** [Makefile:84: all] Error 2 

gmake[3]: Leaving directory '/home/ma-user/hello_world/samples/operator/ascendc/0_introduction/0_helloworld/build/kernels_aiv_device-prefix/src/kernels_aiv_device-build' 

gmake[2]: *** [CMakeFiles/kernels_aiv_device.dir/build.make:113: kernels_aiv_device-prefix/src/kernels_aiv_device-stamp/kernels_aiv_device-build] Error 2 

gmake[2]: Leaving directory '/home/ma-user/hello_world/samples/operator/ascendc/0_introduction/0_helloworld/build' 

gmake[1]: *** [CMakeFiles/Makefile2:282: CMakeFiles/kernels_aiv_device.dir/all] Error 2 

gmake[1]: Leaving directory '/home/ma-user/hello_world/samples/operator/ascendc/0_introduction/0_helloworld/build' 

gmake: *** [Makefile:130: all] Error 2 

-- Install configuration: "Debug" 

CMake Error at build/cmake_install.cmake:41 (file): 

  file INSTALL cannot find 

  "/home/ma-user/hello_world/samples/operator/ascendc/0_introduction/0_helloworld/build/lib/libkernels.a": 

  No such file or directory. 

 

run.sh: line 54: ./build/main: No such file or directory 

Error, Expected 8 occurrences of Hello World, but found 0 occurrences. 

我要发帖子