mmdeploy icon indicating copy to clipboard operation
mmdeploy copied to clipboard

ERROR: Failed building wheel for onnx

Open meremeev opened this issue 3 years ago • 3 comments

Discussed in https://github.com/open-mmlab/mmdeploy/discussions/716

Originally posted by meremeev July 6, 2022 Building converter for TorchScript and/or TensorRT backend. Got error below

/tmp/pip-install-92s0sdmt/onnx_38ddb31565e7418686210a037f41ec09/onnx/defs/sequence/defs.cc: In function ‘bool onnx::BuildSequenceMapBodyFunc(const onnx::FunctionBodyBuildContext&, const onnx::OpSchema&, onnx::FunctionProto&)’:
  /tmp/pip-install-92s0sdmt/onnx_38ddb31565e7418686210a037f41ec09/onnx/defs/sequence/defs.cc:675:40: error: no match for ‘operator[]’ (operand types are ‘google::protobuf::RepeatedPtrField<onnx::ValueInfoProto>’ and ‘int’)
           seq_at_node.add_output(g_inputs[inputIndex].name());
                                          ^
  /tmp/pip-install-92s0sdmt/onnx_38ddb31565e7418686210a037f41ec09/onnx/defs/sequence/defs.cc:683:37: error: no match for ‘operator[]’ (operand types are ‘google::protobuf::RepeatedPtrField<onnx::ValueInfoProto>’ and ‘int’)
           identity.add_output(g_inputs[inputIndex].name());
                                       ^
  /tmp/pip-install-92s0sdmt/onnx_38ddb31565e7418686210a037f41ec09/onnx/defs/sequence/defs.cc:741:30: error: no match for ‘operator[]’ (operand types are ‘google::protobuf::RepeatedPtrField<onnx::ValueInfoProto>’ and ‘int’)
       int64_t dtype = g_outputs[outputIndex].type().tensor_type().elem_type();

The same error if I try to use pre-compiled binaries - mmdeploy-0.5.0-linux-x86_64-cuda10.2-tensorrt8.2.3.0

Also

mark@MEREMEEV-LT:~/Code/mmdeploy$ python3 tools/check_env.py
Segmentation fault (core dumped)

meremeev avatar Jul 07 '22 05:07 meremeev

@meremeev Hi, could you post here your environment info and the way how you build mmdeploy?

RunningLeon avatar Jul 08 '22 01:07 RunningLeon

@RunningLeon Thank you for response. As you noticed tools/check_env.py failed.

Using prebuit binaries:

I tried mmdeploy-0.5.0-linux-x86_64-cuda10.2-tensorrt8.2.3.0 prebuild binaries. After unpacking and python3 -m pip install dist/mmdeploy-0.5.0-py36-none-linux_x86_64.whl I got error above.

Local build: either

 cmake -DCMAKE_CXX_COMPILER=g++-7 -DMMDEPLOY_TARGET_BACKENDS=trt -DTENSORRT_DIR=${TENSORRT_DIR} -DCUDNN_DIR=${CUDNN_DIR} ..

or

cmake -DCMAKE_CXX_COMPILER=g++-7 -DMMDEPLOY_TARGET_BACKENDS=torchscript -DTorch_DIR=$Torch_DIR/share/cmake/Torch  ..

then

 make -j4 && make install
 cd ..
pip3 install -e .

always result is error above

Environment: Ubuntu 18.04 Python 3.6.9 CUDA 10.2 TensorRT 8.2.3-1+cuda10.2 libtorch 1.8.2 LTS compilers:

mark@MEREMEEV-LT:~/Code/mmdeploy$ gcc --version
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0

mark@MEREMEEV-LT:~/Code/mmdeploy$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2019 NVIDIA Corporation
Built on Wed_Oct_23_19:24:38_PDT_2019
Cuda compilation tools, release 10.2, V10.2.89

python3 env

mark@MEREMEEV-LT:~/Code/mmdeploy$ pip3 list
Package                       Version             Editable project location
----------------------------- ------------------- -----------------------------
absl-py                       0.10.0
actionlib                     1.12.1
addict                        2.4.0
alabaster                     0.7.12
angles                        1.9.12
apipkg                        2.1.0
appdirs                       1.4.4
apturl                        0.5.2
argon2-cffi                   20.1.0
asn1crypto                    1.4.0
astor                         0.8.1
astunparse                    1.6.3
atomicwrites                  1.4.0
attrs                         19.1.0
auditwheel                    5.0.1.dev12
aws-sam-translator            1.42.0
aws-xray-sdk                  2.9.0
Babel                         2.9.1
backcall                      0.2.0
bagpy                         0.4.8
bcrypt                        3.2.0
bitstring                     3.1.9
black                         20.8b1
bleach                        3.1.5
blessings                     1.7
blinker                       1.3
bondpy                        1.8.5
boto                          2.49.0
boto3                         1.18.51
botocore                      1.21.51
bottle                        0.12.19
Brlapi                        0.6.6
build                         0.6.0.post1
cached-property               1.5.2
cachetools                    4.1.1
camera_calibration            1.15.0
camera_calibration_parsers    1.11.13
carla                         0.9.10
catkin                        0.7.29
catkin-pkg                    0.4.24
certifi                       2021.10.8
cffi                          1.15.0
cfgv                          3.3.1
cfn-lint                      0.28.4
chardet                       3.0.4
charset-normalizer            2.0.12
clang                         5.0
click                         8.0.3
click-plugins                 1.1.1
cligj                         0.7.2
cmake-format                  0.6.13
cmakelang                     0.6.13
colorama                      0.4.4
command-not-found             0.3
commonmark                    0.9.1
conan                         1.44.1
configobj                     5.0.6
configparser                  5.0.0
controller_manager            0.18.4
controller_manager_msgs       0.18.4
coverage                      5.2.1
cryptography                  3.3.2
cupshelpers                   1.0
cv_bridge                     1.13.0
cycler                        0.11.0
Cython                        0.29.21
dataclasses                   0.8
decorator                     4.4.2
defer                         1.0.6
defusedxml                    0.6.0
deprecation                   2.0.7
descartes                     1.1.0
diagnostic_analysis           1.9.7
diagnostic_common_diagnostics 1.9.7
diagnostic_updater            1.9.7
dill                          0.3.4
distlib                       0.3.1
distro                        1.6.0
distro-info                   0.18ubuntu0.18.04.1
dnspython                     1.16.0
docker                        5.0.3
docker-pycreds                0.4.0
docutils                      0.18.1
dohq-artifactory              0.7.742
dpkt                          1.9.7.2
dynamic_reconfigure           1.6.5
ecdsa                         0.14.1
elementpath                   1.3.3
entrypoints                   0.3
ephem                         4.1.3
execnet                       1.7.1
fasteners                     0.16.3
filelock                      3.0.12
Fiona                         1.8.20
fire                          0.4.0
flake8                        3.9.2
flatbuffers                   1.12
future                        0.18.2
gast                          0.4.0
gazebo_plugins                2.8.7
gazebo_ros                    2.8.7
gcovr                         5.0
gencpp                        0.6.5
geneus                        2.2.6
genlisp                       0.4.16
genmsg                        0.5.16
gennodejs                     2.0.1
genpy                         0.6.16
geographiclib                 1.52
geopandas                     0.8.1
geopy                         1.18.1
ghp-import                    2.0.2
gitdb                         4.0.5
GitPython                     3.1.8
gnupg                         2.3.1
google-auth                   1.21.1
google-auth-oauthlib          0.4.1
google-pasta                  0.2.0
gps_common                    0.3.1
gpustat                       0.6.0
gql                           0.2.0
graphql-core                  1.1
greenlet                      1.1.2
grpcio                        1.46.3
h5py                          3.1.0
httplib2                      0.9.2
identify                      2.3.5
idna                          2.10
igraph                        0.9.8
image_geometry                1.13.0
imageio                       2.9.0
imageio-ffmpeg                0.4.4
imagesize                     1.3.0
importlib-metadata            4.8.3
importlib-resources           1.0.2
interactive-markers           1.11.5
ipykernel                     5.3.4
ipython                       7.16.3
ipython-genutils              0.2.0
ipywidgets                    7.7.1
jedi                          0.17.2
Jinja2                        2.11.3
jmespath                      0.10.0
joblib                        1.1.0
joint_state_publisher         1.12.15
jsondiff                      1.3.0
jsonpatch                     1.26
jsonpickle                    1.4.2
jsonpointer                   1.9
jsonschema                    3.2.0
junit-xml                     1.9
jupyter                       1.0.0
jupyter-client                7.1.2
jupyter-console               6.4.3
jupyter-core                  4.6.3
jupyterlab-widgets            1.1.1
kdl-parser-py                 1.13.3
keras                         2.6.0
Keras-Applications            1.0.8
Keras-Preprocessing           1.1.2
keyring                       10.6.0
keyrings.alt                  3.0
kiwisolver                    1.3.1
language-selector             0.1
laser_geometry                1.6.7
launchpadlib                  1.10.6
lazr.restfulclient            0.13.5
lazr.uri                      1.0.3
llvmlite                      0.36.0
louis                         3.5.0
lxml                          4.6.3
lyft-dataset-sdk              0.0.8
m2r2                          0.3.2
Mako                          1.0.7
Markdown                      3.3.6
MarkupSafe                    0.23
matplotlib                    3.3.4
mccabe                        0.6.1
mergedeep                     1.3.4
message_filters               1.14.13
mistune                       0.8.4
mkdocs                        1.2.3
mmcls                         0.23.1
mmcv-full                     1.5.3
mmdet                         2.25.0
mmdet3d                       1.0.0rc3            /home/mark/Code/mmdetection3d
mmsegmentation                0.26.0
mock                          4.0.3
model-index                   0.1.11
mongomock                     3.21.0
monotonic                     1.5
more-itertools                8.12.0
moto                          1.3.16
motor                         2.0.0
mpmath                        1.2.1
msgpack-python                0.5.6
msgpack-rpc-python            0.4.1
munch                         2.5.0
mypy-extensions               0.4.3
nbconvert                     5.6.1
nbformat                      5.0.7
nest-asyncio                  1.5.5
netifaces                     0.10.4
networkx                      2.2
node-semver                   0.6.1
nodeenv                       1.6.0
nose2                         0.9.2
notebook                      6.1.3
numba                         0.53.0
numpy                         1.19.5
nuscenes-devkit               1.1.9
nvidia-ml-py3                 7.352.0
oauth                         1.0.1
oauthlib                      3.2.0
olefile                       0.45.1
onnx                          1.7.0
opencv-python                 4.0.0.21
openmim                       0.2.0
opt-einsum                    3.3.0
ordered-set                   4.0.2
packaging                     21.3
pandas                        0.25.3
pandocfilters                 1.4.2
paramiko                      2.9.1
parso                         0.7.1
patch-ng                      1.17.4
patchelf                      0.13.1.0
pathlib                       1.0.1
pathspec                      0.9.0
pathtools                     0.1.2
pbr                           5.4.5
pep517                        0.12.0
pexpect                       4.8.0
pickleshare                   0.7.5
Pillow                        8.2.0
pip                           21.3.1
pkgconfig                     1.5.1
plotly                        4.9.0
pluggy                        1.0.0
pluginbase                    1.0.1
plyfile                       0.7.4
pre-commit                    2.15.0
prettytable                   0.7.2
prometheus-client             0.8.0
promise                       2.3
prompt-toolkit                3.0.19
protobuf                      3.13.0
psutil                        5.6.7
ptyprocess                    0.7.0
py                            1.11.0
py-trees                      0.8.3
py3rosmsgs                    1.18.1
pyasn1                        0.4.8
pyasn1-modules                0.2.8
pycairo                       1.16.2
pycapnp                       0.6.4
pycocotools                   2.0.4
pycodestyle                   2.7.0
pycparser                     2.21
pycrypto                      2.6.1
pycryptodomex                 3.14.1
pycuda                        2019.1.2
pycups                        1.9.73
pycurl                        7.43.0
pydantic                      1.9.0
pydash                        5.1.0
pydot                         1.4.2
pyelftools                    0.27
pyfakefs                      4.2.0
pyflakes                      2.3.1
pygeos                        0.8
Pygments                      2.11.2
PyGObject                     3.26.1
PyJWT                         1.7.1
pykitti                       0.3.1
pymacaroons                   0.13.0
pymdown-extensions            9.1
pymongo                       3.11.3
PyNaCl                        1.4.0
pyparsing                     3.0.6
pyproj                        3.0.1
pyquaternion                  0.9.5
pyRFC3339                     1.0
pyrsistent                    0.18.0
pyserial                      3.5
pytest                        3.10.1
python-apt                    1.6.5+ubuntu0.7
python-dateutil               2.8.2
python-debian                 0.1.32
python-jose                   3.2.0
python-magic                  0.4.24
python_qt_binding             0.4.4
pytils                        0.3
pytools                       2020.4
pytz                          2021.3
PyWavelets                    1.1.1
pyxdg                         0.25
PyYAML                        5.4.1
pyyaml_env_tag                0.1
pyzmq                         19.0.1
qt-dotgraph                   0.4.2
qt-gui                        0.4.2
qt-gui-cpp                    0.4.2
qt-gui-py-common              0.4.2
qtconsole                     5.2.2
QtPy                          2.0.1
recommonmark                  0.7.1
redis                         2.10.5
regex                         2021.11.10
reportlab                     3.4.0
requests                      2.27.1
requests-oauthlib             1.3.0
requests-unixsocket           0.1.5
resource_retriever            1.12.7
responses                     0.16.0
retrying                      1.3.3
rich                          12.4.4
rinoh-typeface-dejavuserif    0.1.3
rinoh-typeface-texgyrecursor  0.1.1
rinoh-typeface-texgyreheros   0.1.1
rinoh-typeface-texgyrepagella 0.1.1
rinohtype                     0.5.3
rosbag                        1.14.13
rosboost-cfg                  1.14.9
rosclean                      1.14.9
roscreate                     1.14.9
rosdep                        0.21.0
rosdistro                     0.8.3
rosgraph                      1.14.13
rosinstall                    0.7.8
rosinstall-generator          0.1.22
roslaunch                     1.14.13
roslib                        1.14.9
roslint                       0.11.2
roslz4                        1.14.13
rosmake                       1.14.9
rosmaster                     1.14.13
rosmsg                        1.14.13
rosnode                       1.14.13
rosparam                      1.14.13
rospkg                        1.4.0
rospy                         1.14.13
rosservice                    1.14.13
rostest                       1.14.13
rostopic                      1.14.13
rosunit                       1.14.9
roswtf                        1.14.13
rqt_action                    0.4.9
rqt_bag                       0.5.1
rqt_bag_plugins               0.5.1
rqt_console                   0.4.9
rqt_dep                       0.4.9
rqt_graph                     0.4.11
rqt_gui                       0.5.3
rqt_gui_py                    0.5.3
rqt_image_view                0.4.16
rqt_launch                    0.4.8
rqt_logger_level              0.4.8
rqt-moveit                    0.5.10
rqt_msg                       0.4.8
rqt_nav_view                  0.5.7
rqt_plot                      0.4.13
rqt_pose_view                 0.5.8
rqt_publisher                 0.4.8
rqt_py_common                 0.5.3
rqt_py_console                0.4.8
rqt-reconfigure               0.5.4
rqt_robot_dashboard           0.5.7
rqt-robot-monitor             0.5.14
rqt_robot_steering            0.5.10
rqt_runtime_monitor           0.5.7
rqt-rviz                      0.7.0
rqt_service_caller            0.4.8
rqt_shell                     0.4.9
rqt_srv                       0.4.8
rqt_tf_tree                   0.6.0
rqt_top                       0.4.8
rqt_topic                     0.4.11
rqt_web                       0.4.8
rsa                           4.8
rviz                          1.13.25
s3transfer                    0.5.0
scapy                         2.4.5
scikit-image                  0.17.2
scikit-learn                  0.23.2
scipy                         1.5.4
scp                           0.13.6
screen-resolution-extra       0.0.0
seaborn                       0.11.2
SecretStorage                 2.3.1
Send2Trash                    1.5.0
sensor-msgs                   1.12.8
sentinels                     1.0.0
sentry-sdk                    0.17.3
setGPU                        0.0.7
setuptools                    57.0.0
Shapely                       1.7.1
shortuuid                     1.0.1
simple-watchdog-timer         0.1.1
simplejson                    3.13.2
six                           1.15.0
smach                         2.0.1
smach_ros                     2.0.1
smclib                        1.8.5
smmap                         3.0.4
snowballstemmer               2.2.0
sortedcontainers              2.3.0
Sphinx                        3.2.1
sphinx-autodoc-typehints      1.4.0
sphinx-bootstrap-theme        0.8.1
sphinx-markdown-parser        0.2.4
sphinx-rtd-theme              0.5.1
sphinxcontrib-applehelp       1.0.2
sphinxcontrib-devhelp         1.0.2
sphinxcontrib-htmlhelp        2.0.0
sphinxcontrib-jsmath          1.0.1
sphinxcontrib-qthelp          1.0.3
sphinxcontrib-serializinghtml 1.1.5
ssh-import-id                 5.7
sshpubkeys                    3.3.1
subprocess32                  3.5.4
sympy                         1.9
system-service                0.3
systemd-python                234
tabulate                      0.8.9
tenacity                      6.3.1
tensorboard                   2.6.0
tensorboard-data-server       0.6.1
tensorboard-plugin-wit        1.8.1
tensorflow                    2.6.2
tensorflow-estimator          2.6.0
tensorrt                      8.2.3.0
termcolor                     1.1.0
terminado                     0.8.3
terminaltables                3.1.10
testpath                      0.4.4
testresources                 2.0.1
texttable                     1.6.4
tf                            1.12.1
tf_conversions                1.12.1
tf2_geometry_msgs             0.6.5
tf2_kdl                       0.6.5
tf2_py                        0.6.5
tf2_ros                       0.6.5
threadpoolctl                 3.0.0
tifffile                      2020.9.3
toml                          0.10.2
tomli                         1.2.3
tools                         0.1.9
topic_tools                   1.14.13
torch                         1.8.1
torch2trt                     0.3.0
torchfile                     0.1.0
torchnet                      0.0.4
torchsummary                  1.5.1
torchvision                   0.9.1
tornado                       6.1
tqdm                          4.50.2
traitlets                     4.3.3
trimesh                       2.35.39
typed-ast                     1.5.1
typing                        3.7.4.3
typing_extensions             4.1.1
ubuntu-advantage-tools        27.9
ubuntu-drivers-common         0.0.0
ufw                           0.36
unattended-upgrades           0.1
undertest                     1.0.0
unify                         0.5
untokenize                    0.1.1
urdfdom-py                    0.4.6
urllib3                       1.26.7
usb-creator                   0.3.3
utm                           0.5.0
vcstool                       0.3.0
vcstools                      0.1.42
virtualenv                    20.0.30
visdom                        0.1.8.9
wadllib                       1.3.2
wandb                         0.9.7
watchdog                      2.1.6
wcwidth                       0.2.5
webencodings                  0.5.1
websocket-client              1.2.3
Werkzeug                      2.0.2
wheel                         0.37.1
widgetsnbextension            3.6.1
wrapt                         1.12.1
wstool                        0.1.17
xacro                         1.13.17
xkit                          0.0.0
xmlschema                     1.0.18
xmltodict                     0.12.0
yapf                          0.32.0
ytsphinx                      1.2.1.dev20200430
zipp                          3.6.0
zope.interface                4.3.2

meremeev avatar Jul 08 '22 23:07 meremeev

Could you try to locate what caused check_env.py crash?

grimoire avatar Jul 14 '22 02:07 grimoire