rknn-toolkit icon indicating copy to clipboard operation
rknn-toolkit copied to clipboard

Illegal instruction (core dumped) when rknn = RKNN()

Open curtyc opened this issue 2 years ago • 1 comments

My installation is:

UBUNTU 20.04.4 LTS:

Update package lists $ sudo apt update

Add the deadsnakes repository $ sudo add-apt-repository ppa:deadsnakes/ppa

Install Python 3.5 $ sudo apt install python3.5

Install the venv package for Python 3.5 $ sudo apt install python3.5-venv

Install dependent libraries: $ sudo apt-get install libpython3.5-dev $ sudo apt install python3.5-tk

Download RKNN Toolkit: $ cd ~/Downloads; mkdir SOEdge; cd SOEdge $ cd ~/Downloads/SOEdge; mkdir RKNN_Toolkit; cd RKNN_Toolkit $ wget https://github.com/rockchip-linux/rknn-toolkit/releases/download/v1.7.1/rknn-toolkit-v1.7.1-packages.tar.gz $ tar xfvz rknn-toolkit-v1.7.1-packages.tar.gz

Create virtual environment: $ cd ~/; mkdir RKNN_App_001; cd RKNN_App_001

Create a new venv virtual environment with Python 3.5 in it $ python3.5 -m venv ./RKNN_venv

Activate the new venv $ source ./RKNN_venv/bin/activate (RKNN_venv) $

Obs: To quit: (RKNN_venv) $ deactivate

Install dependent libraries: opencv-python, TensorFlow, PuTorch, MXNet

Install opencv-python: (RKNN_venv) $ pip3 install opencv-python

Install tensorflow (cpu): (RKNN_venv) $ pip install tensorflow==1.11.0

Install PyTorch and torchvision: (RKNN_venv) $ pip3 install torch==1.5.1 torchvision-0.6.1

Install mxnet: (RKNN_venv) $ pip3 install mxnet==1.5.0

Install RKNN Toolkit: (RKNN_venv) $ pip3 install /home/curtyc/Downloads/SOEdge/RKNN_Toolkit/packages/rknn_toolkit-1.7.1-cp35-cp35m-linux_x86_64.whl

Testing: (RKNN_venv) $ python3 Python 3.5.10 (default, Jan 15 2022, 19:53:00) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information.

from rknn.api import RKNN     <---- It's good!

But when we try this example:

https://github.com/rockchip-linux/rknn-toolkit/tree/master/examples/tensorflow/ssd_mobilenet_v1

the following error message arrives:

Illegal instruction (core dumped)

just after:

rknn = RKNN()

When we try to isolate the problem, same happens:

$ python Python 3.5.10 (default, Jan 15 2022, 19:53:00) [GCC 9.3.0] on linux Type "help", "copyright", "credits" or "license" for more information.

from rknn.api import RKNN rknn = RKNN() Illegal instruction (core dumped)

What should we do?

Thanks in advance for any help. :-)

Obs: This same configuration works fine for the same example, using another Intel i7 machine running Ubuntu 20.04.4 LTS.

curtyc avatar Jul 11 '22 21:07 curtyc

Illegal instruction (core dumped) Hi, I have the same problem as you, did you find a solution?

343195246 avatar May 10 '24 02:05 343195246