执行build.sh出现报错
收藏回复举报
执行build.sh出现报错
t('forum.solved') 已解决
发表于2024-03-23 20:56:06
0 查看

执行build.sh后有以下报错,这类报错是哪里不对一般

Preset CMake variables:

  ASCEND_CANN_PACKAGE_PATH:PATH="/usr/local/Ascend/ascend-toolkit/latest"
  ASCEND_COMPUTE_UNIT:STRING="Ascned910A"
  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="/tmp/code/AscendC/Sinh/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
-- The CXX compiler identification is GNU 7.3.0
-- 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!
Invalid socVersion Ascned910A

opbuild ops error: 
-- Opbuild generating sources - done
-- PACKAGE tikreplaylib FOUND
SinhCustom replay not enabled
-- Configuring done (3.4s)
-- 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: /tmp/code/AscendC/Sinh/SinhCustom/build_out
[  7%] Generating scripts/install.sh, scripts/upgrade.sh
[ 15%] Generating tbe/.impl_timestamp
[ 23%] Generating tbe/op_info_cfg/ai_core/npu_supported_ops.json
[ 38%] Building CXX object op_host/CMakeFiles/cust_opapi.dir/__/autogen/aclnn_sinh_custom.cpp.o
[ 38%] Building CXX object op_host/CMakeFiles/cust_optiling.dir/sinh_custom.cpp.o
[ 46%] Generating tbe/op_info_cfg/ai_core/Ascned910A/aic-Ascned910A-ops-info.json
[ 61%] Building CXX object op_host/CMakeFiles/cust_op_proto.dir/__/autogen/op_proto.cc.o
[ 61%] Building CXX object framework/tf_plugin/CMakeFiles/cust_tf_parsers.dir/tensorflow_sinh_custom_plugin.cc.o
[ 61%] Built target gen_version_info
[ 69%] Building CXX object op_host/CMakeFiles/cust_op_proto.dir/sinh_custom.cpp.o
/tmp/code/AscendC/Sinh/SinhCustom/build_out/autogen /tmp/code/AscendC/Sinh/SinhCustom/build_out/op_kernel/tbe/op_info_cfg/ai_core
[ 69%] Built target modify_vendor


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


Compile op info cfg successfully.
[INFO] Succed generated /tmp/code/AscendC/Sinh/SinhCustom/build_out/op_kernel/tbe/op_info_cfg/ai_core/npu_supported_ops.json
[ 69%] Built target ascendc_impl_gen
[ 69%] Built target ops_info_gen_Ascned910A
[ 69%] Built target npu_supported_ops
/tmp/code/AscendC/Sinh/SinhCustom/build_out/autogen/aclnn_sinh_custom.cpp:37:41: error: expected primary-expression before ‘inputDesc0_0’
 uint32_t socSupportList[] = {TensorDesc inputDesc0_0[1] =
                                         ^~~~~~~~~~~~
/tmp/code/AscendC/Sinh/SinhCustom/build_out/autogen/aclnn_sinh_custom.cpp:37:41: error: expected ‘}’ before ‘inputDesc0_0’
/tmp/code/AscendC/Sinh/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};
                        ^~~~~~~~~~~~
/tmp/code/AscendC/Sinh/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
/tmp/code/AscendC/Sinh/SinhCustom/build_out/autogen/aclnn_sinh_custom.cpp: In function ‘aclnnStatus aclnnSinhCustomGetWorkspaceSize(const aclTensor*, const aclTensor*, uint64_t*, aclOpExecutor**)’:
/tmp/code/AscendC/Sinh/SinhCustom/build_out/autogen/aclnn_sinh_custom.cpp:127:95: error: ‘socSupportListLen’ was not declared in this scope
     NNOPBASE_ASSERT_OK_RETVAL(NnopbaseAddSupportList(*executor, &supportList, socSupportList, socSupportListLen));
                                                                                               ^
/tmp/code/AscendC/Sinh/SinhCustom/build_out/autogen/aclnn_sinh_custom.cpp:82: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_opmaster_rt2.0.so
[ 92%] Linking CXX shared library libcust_opsproto_rt2.0.so
[ 92%] Built target cust_optiling
[ 92%] Built target cust_op_proto
gmake: *** [Makefile:156: all] Error 2

我要发帖子