AMCT ONNX版本不匹配
收藏回复举报
AMCT ONNX版本不匹配
t('forum.solved') 已解决
发表于2024-08-15 10:11:19
0 查看

开发版环境:
CANN版本: 6.3.RC1

arm64

Screenshot%20from%202024-08-13%2017-14-23.png

ONNX == 1.14.0

ONNXRuntime == 1.16.0

安装amct成功 但是执行安装后处理时(编译并安装自定义算子包)报错:

OSError: amct_onnx now only support onnxruntime/onnxruntime-gpu 1.5.2, 1.6.0 or 1.8.0. if need to use opset 13, onnxruntime/onnxruntime-gpu 1.6.0 is required; opset 14 requires onnxruntime/onnxruntime-gpu 1.8.0

难道 6.3.RC1 最高支持onnxruntime == 1.8.0?

尝试安装低版本onnx==1.9.0,遇到报错:

Building wheels for collected packages: onnx

Building wheel for onnx (pyproject.toml) ... error

error: subprocess-exited-with-error

× Building wheel for onnx (pyproject.toml) did not run successfully.

│ exit code: 1

╰─> [103 lines of output]

<string>:36: DeprecationWarning: Use shutil.which instead of find_executable

<string>:37: DeprecationWarning: Use shutil.which instead of find_executable

fatal: not a git repository (or any of the parent directories): .git

/tmp/pip-build-env-6x7wmz0a/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py:268: UserWarning: Unknown distribution option: 'tests_require'

warnings.warn(msg)

/tmp/pip-build-env-6x7wmz0a/overlay/lib/python3.9/site-packages/setuptools/dist.py:447: SetuptoolsDeprecationWarning: Invalid dash-separated options

!!

********************************************************************************

Usage of dash-separated 'license-file' will not be supported in future

versions. Please use the underscore name 'license_file' instead.

By 2024-Sep-26, you need to update your project and remove deprecated calls

or your builds will no longer be supported.

See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.

********************************************************************************

!!

opt = self.warn_dash_deprecation(opt, section)

running bdist_wheel

running build

running build_py

running create_version

running cmake_build

Using cmake args: ['/usr/local/bin/cmake', '-DPYTHON_INCLUDE_DIR=/usr/local/python-3.9.10/include/python3.9', '-DPYTHON_EXECUTABLE=/usr/local/python-3.9.10/bin/python3.9', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cpython-39-aarch64-linux-gnu.so', '-DCMAKE_BUILD_TYPE=Release', '-DONNX_ML=1', '/tmp/pip-install-ie5jr3bz/onnx_8aef4cf467514ada985833bf363ecafe']

-- The C compiler identification is GNU 7.5.0

-- The CXX compiler identification is GNU 7.5.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

-- Found PythonInterp: /usr/local/python-3.9.10/bin/python3.9 (found version "3.9.10")

-- Found PythonLibs: /usr/local/python-3.9.10/lib/libpython3.9.a (found version "3.9.10")

Generated: /tmp/pip-install-ie5jr3bz/onnx_8aef4cf467514ada985833bf363ecafe/.setuptools-cmake-build/onnx/onnx-ml.proto

CMake Error at CMakeLists.txt:292 (message):

Protobuf compiler not found

Call Stack (most recent call first):

CMakeLists.txt:323 (relative_protobuf_generate_cpp)

-- Configuring incomplete, errors occurred!

Traceback (most recent call last):

File "/usr/local/python-3.9.10/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>

main()

File "/usr/local/python-3.9.10/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main

json_out['return_val'] = hook(**hook_input['kwargs'])

File "/usr/local/python-3.9.10/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel

return _build_backend().build_wheel(wheel_directory, config_settings,

File "/tmp/pip-build-env-6x7wmz0a/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 415, in build_wheel

return self._build_with_temp_dir(

File "/tmp/pip-build-env-6x7wmz0a/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 397, in _build_with_temp_dir

self.run_setup()

File "/tmp/pip-build-env-6x7wmz0a/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 497, in run_setup

super().run_setup(setup_script=setup_script)

File "/tmp/pip-build-env-6x7wmz0a/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 313, in run_setup

exec(code, locals())

File "<string>", line 337, in <module>

File "/tmp/pip-build-env-6x7wmz0a/overlay/lib/python3.9/site-packages/setuptools/__init__.py", line 108, in setup

return distutils.core.setup(**attrs)

File "/tmp/pip-build-env-6x7wmz0a/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 184, in setup

return run_commands(dist)

File "/tmp/pip-build-env-6x7wmz0a/overlay/lib/python3.9/site-packages/setuptools/_distutils/core.py", line 200, in run_commands

dist.run_commands()

File "/tmp/pip-build-env-6x7wmz0a/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 970, in run_commands

self.run_command(cmd)

File "/tmp/pip-build-env-6x7wmz0a/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 945, in run_command

super().run_command(command)

File "/tmp/pip-build-env-6x7wmz0a/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 989, in run_command

cmd_obj.run()

File "/tmp/pip-build-env-6x7wmz0a/overlay/lib/python3.9/site-packages/setuptools/command/bdist_wheel.py", line 373, in run

self.run_command("build")

File "/tmp/pip-build-env-6x7wmz0a/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command

self.distribution.run_command(command)

File "/tmp/pip-build-env-6x7wmz0a/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 945, in run_command

super().run_command(command)

File "/tmp/pip-build-env-6x7wmz0a/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 989, in run_command

cmd_obj.run()

File "/tmp/pip-build-env-6x7wmz0a/overlay/lib/python3.9/site-packages/setuptools/_distutils/command/build.py", line 135, in run

self.run_command(cmd_name)

File "/tmp/pip-build-env-6x7wmz0a/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command

self.distribution.run_command(command)

File "/tmp/pip-build-env-6x7wmz0a/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 945, in run_command

super().run_command(command)

File "/tmp/pip-build-env-6x7wmz0a/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 989, in run_command

cmd_obj.run()

File "<string>", line 233, in run

File "/tmp/pip-build-env-6x7wmz0a/overlay/lib/python3.9/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command

self.distribution.run_command(command)

File "/tmp/pip-build-env-6x7wmz0a/overlay/lib/python3.9/site-packages/setuptools/dist.py", line 945, in run_command

super().run_command(command)

File "/tmp/pip-build-env-6x7wmz0a/overlay/lib/python3.9/site-packages/setuptools/_distutils/dist.py", line 989, in run_command

cmd_obj.run()

File "<string>", line 219, in run

File "/usr/local/python-3.9.10/lib/python3.9/subprocess.py", line 373, in check_call

raise CalledProcessError(retcode, cmd)

subprocess.CalledProcessError: Command '['/usr/local/bin/cmake', '-DPYTHON_INCLUDE_DIR=/usr/local/python-3.9.10/include/python3.9', '-DPYTHON_EXECUTABLE=/usr/local/python-3.9.10/bin/python3.9', '-DBUILD_ONNX_PYTHON=ON', '-DCMAKE_EXPORT_COMPILE_COMMANDS=ON', '-DONNX_NAMESPACE=onnx', '-DPY_EXT_SUFFIX=.cpython-39-aarch64-linux-gnu.so', '-DCMAKE_BUILD_TYPE=Release', '-DONNX_ML=1', '/tmp/pip-install-ie5jr3bz/onnx_8aef4cf467514ada985833bf363ecafe']' returned non-zero exit status 1.

[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.

ERROR: Failed building wheel for onnx

Failed to build onnx

ERROR: Could not build wheels for onnx, which is required to install pyproject.toml-based projects

我要发帖子