华为计算微信公众号
昇腾AI开发者公众号
华为计算微博
华为计算今日头条
在Docker中安装acmt_onnx模型量化时,运行cd amct_onnx_op && python3 setup.py build时,报错:
cd amct_onnx_op && python3 setup.py build
[INFO]'/home/mdc510/share/mdc_workspace/MDC_AS31XM1X_ACC_LIB/amct/amct_onnx/amct_onnx_op/inc/onnxruntime_cxx_api.h' already exist, no need to download. [INFO]'/home/mdc510/share/mdc_workspace/MDC_AS31XM1X_ACC_LIB/amct/amct_onnx/amct_onnx_op/inc/onnxruntime_cxx_inline.h' already exist, no need to download. [INFO]'/home/mdc510/share/mdc_workspace/MDC_AS31XM1X_ACC_LIB/amct/amct_onnx/amct_onnx_op/inc/onnxruntime_c_api.h' already exist, no need to download. [INFO]'/home/mdc510/share/mdc_workspace/MDC_AS31XM1X_ACC_LIB/amct/amct_onnx/amct_onnx_op/inc/onnxruntime_session_options_config_keys.h' already exist, no need to download. running build running build_ext building 'amct_onnx_ops' extension creating build creating build/temp.linux-x86_64-3.7 creating build/temp.linux-x86_64-3.7/home creating build/temp.linux-x86_64-3.7/home/mdc510 creating build/temp.linux-x86_64-3.7/home/mdc510/share creating build/temp.linux-x86_64-3.7/home/mdc510/share/mdc_workspace creating build/temp.linux-x86_64-3.7/home/mdc510/share/mdc_workspace/MDC_AS31XM1X_ACC_LIB creating build/temp.linux-x86_64-3.7/home/mdc510/share/mdc_workspace/MDC_AS31XM1X_ACC_LIB/amct creating build/temp.linux-x86_64-3.7/home/mdc510/share/mdc_workspace/MDC_AS31XM1X_ACC_LIB/amct/amct_onnx creating build/temp.linux-x86_64-3.7/home/mdc510/share/mdc_workspace/MDC_AS31XM1X_ACC_LIB/amct/amct_onnx/amct_onnx_op creating build/temp.linux-x86_64-3.7/home/mdc510/share/mdc_workspace/MDC_AS31XM1X_ACC_LIB/amct/amct_onnx/amct_onnx_op/src ... creating build/lib.linux-x86_64-3.7 g++ -pthread -shared build/temp.linux-x86_64-3.7/home/mdc510/share/mdc_workspace/MDC_AS31XM1X_ACC_LIB/amct/amct_onnx/amct_onnx_op/src/custom_op_library.o build/temp.linux-x86_64-3.7/home/mdc510/share/mdc_workspace/MDC_AS31XM1X_ACC_LIB/amct/amct_onnx/amct_onnx_op/src/ifmr_kernel.o build/temp.linux-x86_64-3.7/home/mdc510/share/mdc_workspace/MDC_AS31XM1X_ACC_LIB/amct/amct_onnx/amct_onnx_op/src/quant_kernel.o build/temp.linux-x86_64-3.7/home/mdc510/share/mdc_workspace/MDC_AS31XM1X_ACC_LIB/amct/amct_onnx/amct_onnx_op/src/dequant_kernel.o build/temp.linux-x86_64-3.7/home/mdc510/share/mdc_workspace/MDC_AS31XM1X_ACC_LIB/amct/amct_onnx/amct_onnx_op/src/ascend_quant_kernel.o build/temp.linux-x86_64-3.7/home/mdc510/share/mdc_workspace/MDC_AS31XM1X_ACC_LIB/amct/amct_onnx/amct_onnx_op/src/ascend_dequant_kernel.o build/temp.linux-x86_64-3.7/home/mdc510/share/mdc_workspace/MDC_AS31XM1X_ACC_LIB/amct/amct_onnx/amct_onnx_op/src/ascend_antiquant_kernel.o build/temp.linux-x86_64-3.7/home/mdc510/share/mdc_workspace/MDC_AS31XM1X_ACC_LIB/amct/amct_onnx/amct_onnx_op/src/dequant_quant.o build/temp.linux-x86_64-3.7/home/mdc510/share/mdc_workspace/MDC_AS31XM1X_ACC_LIB/amct/amct_onnx/amct_onnx_op/src/hfmg_kernel.o build/temp.linux-x86_64-3.7/home/mdc510/share/mdc_workspace/MDC_AS31XM1X_ACC_LIB/amct/amct_onnx/amct_onnx_op/src/search_n_kernel.o build/temp.linux-x86_64-3.7/home/mdc510/share/mdc_workspace/MDC_AS31XM1X_ACC_LIB/amct/amct_onnx/amct_onnx_op/src/search_n_v2_kernel.o build/temp.linux-x86_64-3.7/home/mdc510/share/mdc_workspace/MDC_AS31XM1X_ACC_LIB/amct/amct_onnx/amct_onnx_op/src/dmq_balance_kernel.o build/temp.linux-x86_64-3.7/home/mdc510/share/mdc_workspace/MDC_AS31XM1X_ACC_LIB/amct/amct_onnx/amct_onnx_op/src/amct_utils.o build/temp.linux-x86_64-3.7/home/mdc510/share/mdc_workspace/MDC_AS31XM1X_ACC_LIB/amct/amct_onnx/amct_onnx_op/src/dump_kernel.o -L/home/mdc510/.local/lib/python3.7/site-packages/amct_onnx/utils/../lib -L/usr/local/python3.7.5/lib -lpthread -lrt -lc -ldl -lstdc++ -lquant_onnx -lpython3.7m -o build/lib.linux-x86_64-3.7/amct_onnx_ops.cpython-37m-x86_64-linux-gnu.so -Wl,-z,relro,-z,now -Wl,-z,noexecstack -fopenmp -Wl,-rpath,/home/mdc510/.local/lib/python3.7/site-packages/amct_onnx/utils/../lib /usr/bin/ld: build/temp.linux-x86_64-3.7/home/mdc510/share/mdc_workspace/MDC_AS31XM1X_ACC_LIB/amct/amct_onnx/amct_onnx_op/src/custom_op_library.o: Relocations in generic ELF (EM: 183) /usr/bin/ld: build/temp.linux-x86_64-3.7/home/mdc510/share/mdc_workspace/MDC_AS31XM1X_ACC_LIB/amct/amct_onnx/amct_onnx_op/src/custom_op_library.o: Relocations in generic ELF (EM: 183) ... /usr/bin/ld: build/temp.linux-x86_64-3.7/home/mdc510/share/mdc_workspace/MDC_AS31XM1X_ACC_LIB/amct/amct_onnx/amct_onnx_op/src/custom_op_library.o: Relocations in generic ELF (EM: 183) /usr/bin/ld: build/temp.linux-x86_64-3.7/home/mdc510/share/mdc_workspace/MDC_AS31XM1X_ACC_LIB/amct/amct_onnx/amct_onnx_op/src/custom_op_library.o: error adding symbols: file in wrong format collect2: error: ld returned 1 exit status error: command 'g++' failed with exit status 1
尝试:
(失败)删除acct_onnx_op文件夹后,重新解压acmt_onnx_op.tar.gz
查验g++, gcc版本:和文档要求一样,都是9.4.0
我的onnxruntime装的是1.8.0,从github下载的头文件也是1.8.0的头文件。
onnx版本是1.10.0
本帖最后由 匿名用户 于 2024/05/13 11:26:21 编辑
我要发帖子
在Docker中安装acmt_onnx模型量化时,运行
cd amct_onnx_op && python3 setup.py build时,报错:尝试:
(失败)删除acct_onnx_op文件夹后,重新解压acmt_onnx_op.tar.gz
查验g++, gcc版本:和文档要求一样,都是9.4.0
我的onnxruntime装的是1.8.0,从github下载的头文件也是1.8.0的头文件。
onnx版本是1.10.0