tensil-ai / tensil

Open source machine learning accelerators
https://www.tensil.ai
Other
356 stars 29 forks source link

Kernel keeps dying on jupyter notebook #89

Open Hanychei opened 2 years ago

Hanychei commented 2 years ago

Hello all, Am trying to accelerate yolov4 on pynq z1 board everything is working fine but am stuck at the end of the tutorial on jupyter at this particular line

outputs = tcu.run(inputs)

Thank you

arif-pens77 commented 2 years ago

I got the same problem but at a little bit further line. interpreter.invoke()

LotfiT commented 2 years ago

@Hanychei I encountered this issue before, it was a memory problem on jupyter notebook, try to connect your board through ssh (PuTTY for example)

LotfiT commented 2 years ago

I got the same problem but at a little bit further line. interpreter.invoke()

@arif-pens77 which version of tflite runtime are you using?

arif-pens77 commented 2 years ago

tflite-runtime 2.10.0 on PYNQ 2.7 (Pynq-Z1 board)

I got the same problem but at a little bit further line. interpreter.invoke()

@arif-pens77 which version of tflite runtime are you using?

tflite-runtime 2.10.0 on PYNQ 2.7 (Pynq-Z1 board)

LotfiT commented 2 years ago

I used tflite_runtime-2.11.0-cp37-cp37m-linux_armv7l I think you need to downgrade python to 3.7

arif-pens77 commented 2 years ago

I used tflite_runtime-2.11.0-cp37-cp37m-linux_armv7l I think you need to downgrade python to 3.7

Are you also using Pynq-Z1 board with PYNQ 2.7? I think that python 3.8 is the default version for PYNQ 2.7

LotfiT commented 2 years ago

Yes I am using the same board and 2.7. Yes, but with python 3.8 you will get "Illegal instruction (core dumped) ' error

arif-pens77 commented 2 years ago

Yes I am using the same board and 2.7. Yes, but with python 3.8 you will get "Illegal instruction (core dumped) ' error

I try to downgrade the python version to 3.7 using this method: sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt install python3.7

But, its not working on the first step "sudo add-apt-repository ppa:deadsnakes/ppa
" Traceback (most recent call last): File "/usr/bin/add-apt-repository", line 107, in sp = SoftwareProperties(options=options) File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 118, in init self.reload_sourceslist() File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 613, in reload_sourceslist self.distro.get_sources(self.sourceslist) File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 91, in get_sources raise NoDistroTemplateException( aptsources.distro.NoDistroTemplateException: Error: could not find a distribution template for Pynqlinux/Austin"

Do you have any suggestion?

LotfiT commented 2 years ago

Try this

wget https://www.python.org/ftp/python/3.7.5/Python-3.7.5.tgz

tar -xf Python-3.7.5.tgz

go to Python-3.7.5 directory

./configure --enable-optimizations

then sudo make altinstall to install a second instance and finally sudo make install

Hope this will help

arif-pens77 commented 2 years ago

linux_armv7l

Unfortunately, It is not working. at the end, I got this report ...

Requirement already up-to-date: setuptools in /usr/local/lib/python3.7/site-packages (41.2.0) Requirement already up-to-date: pip in /usr/local/lib/python3.7/site-packages (19.2.3) make: 'python' is up to date. make: *** No rule to make target '3.7'. Stop.

And the python version is still 3.8

LotfiT commented 2 years ago

Have you tried python3.7 --version ?

arif-pens77 commented 2 years ago

Have you tried python3.7 --version ?

Yes, but It's only working on local folder. and its not linked to the existing Jupyter.

tdb-alcorn commented 1 year ago

Can you share logs or a stack trace of what you're seeing in the jupyter logs?

arif-pens77 commented 1 year ago

I successfully install Python 3.7 in new virtual environment by following the instruction here : https://discuss.pynq.io/t/testing-pytorch-1-8-in-zybo-z7-running-pynq-2-7/4181

However, i still have problem when running "interpreter.invoke()"

Could you share your tflite_runtime whl file?

arif-pens77 commented 1 year ago

I used tflite_runtime-2.11.0-cp37-cp37m-linux_armv7l I think you need to downgrade python to 3.7

Could you share your tflite_runtime-2.11.0-cp37-cp37m-linux_armv7l.whl file?