build.sh报错
收藏回复举报
build.sh报错
t('forum.solved') 已解决
新人帖
发表于2024-07-21 22:06:00
0 查看

在build sinh算子工程目录时报错,版本如下:

npu-smi info查看信息为昇腾910ProB,cann使用init_env.sh安装在"value": "/home/ma-user/Ascend/ascend-toolkit/latest"目录下,build add算子是可以成功的。

cke_4604.png

cke_5111.png


报错信息如下:

 

(MindSpore) [ma-user@notebook-e83be82f-b25d-4ad6-a1fd-203fdfb4dd05 SinhCustom]$ bash build.sh  

Preset CMake variables: 

 

  ASCEND_CANN_PACKAGE_PATH:PATH="/home/ma-user/Ascend/ascend-toolkit/latest" 

  ASCEND_COMPUTE_UNIT:STRING="Ascend910ProB" 

  ASCEND_PYTHON_EXECUTABLE:STRING="python3" 

  CMAKE_BUILD_TYPE:STRING="Release" 

  CMAKE_CROSS_PLATFORM_COMPILER:PATH="/usr/bin/aarch64-linux-gnu-g++" 

  CMAKE_INSTALL_PREFIX:PATH="/home/ma-user/work/SinhCustom_1/SinhCustom/SinhCustom/build_out" 

  ENABLE_BINARY_PACKAGE:BOOL="True" 

  ENABLE_CROSS_COMPILE:BOOL="False" 

  ENABLE_SOURCE_PACKAGE:BOOL="True" 

  ENABLE_TEST:BOOL="True" 

  vendor_name:STRING="customize" 

 

-- The C compiler identification is GNU 7.3.0 

CMake Warning (dev) at /home/ma-user/work/cmake-3.28.3-linux-aarch64/share/cmake-3.28/Modules/CMakeFindBinUtils.cmake:224 (find_program): 

  Policy CMP0109 is not set: find_program() requires permission to execute 

  but not to read.  Run "cmake --help-policy CMP0109" for policy details. 

  Use the cmake_policy command to set the policy and suppress this warning. 

 

  The file 

 

    /usr/bin/ld 

 

  is executable but not readable.  CMake is ignoring it for compatibility. 

Call Stack (most recent call first): 

  /home/ma-user/work/cmake-3.28.3-linux-aarch64/share/cmake-3.28/Modules/CMakeDetermineCCompiler.cmake:196 (include) 

  CMakeLists.txt:2 (project) 

This warning is for project developers.  Use -Wno-dev to suppress it. 

 

CMake Warning (dev) at /home/ma-user/work/cmake-3.28.3-linux-aarch64/share/cmake-3.28/Modules/CMakeFindBinUtils.cmake:224 (find_program): 

  Policy CMP0109 is not set: find_program() requires permission to execute 

  but not to read.  Run "cmake --help-policy CMP0109" for policy details. 

  Use the cmake_policy command to set the policy and suppress this warning. 

 

  The file 

 

    /bin/ld 

 

  is executable but not readable.  CMake is ignoring it for compatibility. 

Call Stack (most recent call first): 

  /home/ma-user/work/cmake-3.28.3-linux-aarch64/share/cmake-3.28/Modules/CMakeDetermineCCompiler.cmake:196 (include) 

  CMakeLists.txt:2 (project) 

This warning is for project developers.  Use -Wno-dev to suppress it. 

 

-- The CXX compiler identification is GNU 7.3.0 

CMake Warning (dev) at /home/ma-user/work/cmake-3.28.3-linux-aarch64/share/cmake-3.28/Modules/CMakeFindBinUtils.cmake:224 (find_program): 

  Policy CMP0109 is not set: find_program() requires permission to execute 

  but not to read.  Run "cmake --help-policy CMP0109" for policy details. 

  Use the cmake_policy command to set the policy and suppress this warning. 

 

  The file 

 

    /usr/bin/ld 

 

  is executable but not readable.  CMake is ignoring it for compatibility. 

Call Stack (most recent call first): 

  /home/ma-user/work/cmake-3.28.3-linux-aarch64/share/cmake-3.28/Modules/CMakeDetermineCXXCompiler.cmake:202 (include) 

  CMakeLists.txt:2 (project) 

This warning is for project developers.  Use -Wno-dev to suppress it. 

 

CMake Warning (dev) at /home/ma-user/work/cmake-3.28.3-linux-aarch64/share/cmake-3.28/Modules/CMakeFindBinUtils.cmake:224 (find_program): 

  Policy CMP0109 is not set: find_program() requires permission to execute 

  but not to read.  Run "cmake --help-policy CMP0109" for policy details. 

  Use the cmake_policy command to set the policy and suppress this warning. 

 

  The file 

 

    /bin/ld 

 

  is executable but not readable.  CMake is ignoring it for compatibility. 

Call Stack (most recent call first): 

  /home/ma-user/work/cmake-3.28.3-linux-aarch64/share/cmake-3.28/Modules/CMakeDetermineCXXCompiler.cmake:202 (include) 

  CMakeLists.txt:2 (project) 

This warning is for project developers.  Use -Wno-dev to suppress it. 

 

-- Detecting C compiler ABI info 

-- Detecting C compiler ABI info - done 

-- Check for working C compiler: /usr/bin/cc - skipped 

-- Detecting C compile features 

-- Detecting C compile features - done 

-- Detecting CXX compiler ABI info 

-- Detecting CXX compiler ABI info - done 

-- Check for working CXX compiler: /usr/bin/c++ - skipped 

-- Detecting CXX compile features 

-- Detecting CXX compile features - done 

-- Opbuild generating sources 

opbuild ops info: Generator: aclopnn 

Aclnn Generator construct! 

Aclnn GenrateCode called! 

Aclnn GenrateCode end! 

Generator: cfg 

Stub Generator construct! 

Cfg GenrateCode called! 

Generator: op_proto 

OpProto Generator construct! 

OpProto GenrateCode called! 

error: Invalid socVersion Ascend910ProB 

 

opbuild ops error:  

-- Opbuild generating sources - done 

-- Configuring done (3.0s) 

-- Generating done (0.0s) 

CMake Warning: 

  Manually-specified variables were not used by the project: 

 

    CMAKE_CROSS_PLATFORM_COMPILER 

 

-- Build files have been written to: /home/ma-user/work/SinhCustom_1/SinhCustom/SinhCustom/build_out 

[  7%] Building CXX object op_host/CMakeFiles/cust_optiling.dir/sinh_custom.cpp.o 

[ 15%] Generating scripts/install.sh, scripts/upgrade.sh 

[ 23%] Generating tbe/op_info_cfg/ai_core/npu_supported_ops.json 

[ 30%] Building CXX object framework/tf_plugin/CMakeFiles/cust_tf_parsers.dir/tensorflow_sinh_custom_plugin.cc.o 

[ 53%] Building CXX object op_host/CMakeFiles/cust_op_proto.dir/sinh_custom.cpp.o 

[ 53%] Building CXX object op_host/CMakeFiles/cust_op_proto.dir/__/autogen/op_proto.cc.o 

[ 53%] Building CXX object op_host/CMakeFiles/cust_opapi.dir/__/autogen/aclnn_sinh_custom.cpp.o 

[ 61%] Generating tbe/op_info_cfg/ai_core/Ascend910ProB/aic-Ascend910ProB-ops-info.json 

[ 69%] Generating tbe/.impl_timestamp 

[ 69%] Built target gen_version_info 

/home/ma-user/work/SinhCustom_1/SinhCustom/SinhCustom/build_out/autogen /home/ma-user/work/SinhCustom_1/SinhCustom/SinhCustom/build_out/op_kernel/tbe/op_info_cfg/ai_core 

[ 69%] Built target modify_vendor 

[INFO] Succed generated /home/ma-user/work/SinhCustom_1/SinhCustom/SinhCustom/build_out/op_kernel/tbe/op_info_cfg/ai_core/npu_supported_ops.json 

 

==============check valid for ops info start============== 

==============check valid for ops info end================ 

 

Compile op info cfg successfully. 

[ 69%] Built target npu_supported_ops 

[ 69%] Built target ops_info_gen_Ascend910ProB 

[ 69%] Built target ascendc_impl_gen 

/home/ma-user/work/SinhCustom_1/SinhCustom/SinhCustom/build_out/autogen/aclnn_sinh_custom.cpp:37:41: error: expected primary-expression before ‘inputDesc0_0’ 

 uint32_t socSupportList[] = {TensorDesc inputDesc0_0[1] = 

                                         ^~~~~~~~~~~~ 

/home/ma-user/work/SinhCustom_1/SinhCustom/SinhCustom/build_out/autogen/aclnn_sinh_custom.cpp:37:41: error: expected ‘}’ before ‘inputDesc0_0’ 

/home/ma-user/work/SinhCustom_1/SinhCustom/SinhCustom/build_out/autogen/aclnn_sinh_custom.cpp:41:24: error: ‘inputDesc0_0’ was not declared in this scope 

 SupportInfo list0_0 = {inputDesc0_0, 1, outputDesc0_0, 1}; 

                        ^~~~~~~~~~~~ 

/home/ma-user/work/SinhCustom_1/SinhCustom/SinhCustom/build_out/autogen/aclnn_sinh_custom.cpp:41:24: note: suggested alternative: ‘outputDesc0_0’ 

 SupportInfo list0_0 = {inputDesc0_0, 1, outputDesc0_0, 1}; 

                        ^~~~~~~~~~~~ 

                        outputDesc0_0 

/home/ma-user/work/SinhCustom_1/SinhCustom/SinhCustom/build_out/autogen/aclnn_sinh_custom.cpp: In function ‘aclnnStatus aclnnSinhCustomGetWorkspaceSize(const aclTensor*, const aclTensor*, uint64_t*, aclOpExecutor**)’: 

/home/ma-user/work/SinhCustom_1/SinhCustom/SinhCustom/build_out/autogen/aclnn_sinh_custom.cpp:131:95: error: ‘socSupportListLen’ was not declared in this scope 

     NNOPBASE_ASSERT_OK_RETVAL(NnopbaseAddSupportList(*executor, &supportList, socSupportList, socSupportListLen)); 

                                                                                               ^ 

/home/ma-user/work/SinhCustom_1/SinhCustom/SinhCustom/build_out/autogen/aclnn_sinh_custom.cpp:86:42: note: in definition of macro ‘NNOPBASE_ASSERT_OK_RETVAL’ 

         const aclnnStatus _chk_stutus = (v);                            \ 

                                          ^ 

gmake[2]: *** [op_host/CMakeFiles/cust_opapi.dir/build.make:76: op_host/CMakeFiles/cust_opapi.dir/__/autogen/aclnn_sinh_custom.cpp.o] Error 1 

gmake[1]: *** [CMakeFiles/Makefile2:298: op_host/CMakeFiles/cust_opapi.dir/all] Error 2 

gmake[1]: *** Waiting for unfinished jobs.... 

[ 76%] Linking CXX shared library libcust_tf_parsers.so 

[ 76%] Built target cust_tf_parsers 

[ 84%] Linking CXX shared library libcust_opsproto_rt2.0.so 

[ 92%] Linking CXX shared library libcust_opmaster_rt2.0.so 

[ 92%] Built target cust_op_proto 

[ 92%] Built target cust_optiling 

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

(MindSpore) [ma-user@notebook-e83be82f-b25d-4ad6-a1fd-203fdfb4dd05 SinhCustom]$  

我要发帖子