PYNQ: PYTHON PRODUCTIVITY

Overlay load time difference between terminal and jupyter notebook

If I run the following code from jupyter notebook it takes exactly 1min47 sec to execute:

from ipywidgets import Button, FloatSlider
import ipywidgets as widget
import cv2
import jupyter_ui_poll 
from pynq import Overlay, MMIO, allocate
from pynq.lib.video import *
import time
import pynq.lib as lib
import cffi
pynq.lib.iic.AxiIIC
import numpy as np
from fxpmath import Fxp
from math import radians
overlay = Overlay('processing_pipeline.bit')
print('bitstream downloaded')

also even with Overlay’s download=False argument, it takes a similar time.

But if open a terminal from jupyter environment or use putty and execute this code as a python file it takes less than 5 seconds. Is it usual behavior?

Thanks,
Mizan

1 Like

Can you check which lines of code are taking more time?

Cathal

loading the overlay took the whole time.

overlay = Overlay('processing_pipeline.bit')

Which board are you using and can you share the .bit and hwh? (I’m assuming you are using a hwh)

How many times did you test this?

Cathal

i am using ZCU104 and since like 1week or so i have tried multiple times. It takes exactly 1 minute 47 sec every time in Jupyter. Please check the message for further information.

I did some checks and I can’t see anything wrong. I tried run your code in a notebook on a PYNQ-Z2 and I don’t see the long delay you describe. This included installing the extra packages you are using.

Are you able to try a clean image on a different SD card?

Cathal

okay, I will try with a new image on another sd card.