I am having a hard time trying to install and make work PYNQ on Kria KV260. Any help or suggestions will be welcome.
- Kira KV260
- Ubuntu 20.04 LTS (because I was not able to make Ubuntu 22.04 work correctly. Same problem as described in KR260 Desktop Issue
- PYNQ v1.0 (checkout to branch v1.0 asked by the install script)
- Software: provided example “2_python_environment.ipynb”
I went through the installation of PYNQ by cloning the GitHub repository and following the instructions, and I am able to start JupyterLab. Problems arise when I try to execute the provided kernel “2_python_environment.ipynt”, in section “Numpy Data Movement”:
import numpy as np import pynq def get_pynq_buffer(shape, dtype): """ Simple function to call PYNQ's memory allocator with numpy attributes""" try: return pynq.allocate(shape, dtype) except RuntimeError: print('Load an overlay to allocate memory') return
pynq.allocate() does not work. Looking deeper, It seems that the problem comes from the function _get_xrt_version_embedded() of /usr/local/share/pynq-venv/lib/python3.8/site-packages/pynq/pl_server/xrt_device.py:
def _get_xrt_version_embedded(): output = subprocess.run( ["xbutil", "--version"], stdout=subprocess.PIPE, universal_newlines=True ) if output.returncode != 0: warnings.warn("xbutil failed to run - unable to determine XRT version") return (0, 0, 0) xrt_version_str = output.stdout.split("\n").split(":").strip() return tuple(map(int, xrt_version_str.split(".")))
“xbutil” has no option “–version”. As a quick workaround, I have replaced the code by
xrt_version_str = "1.1.0" (this is given by xbutil dump). But back to “2_python_environment.ipynt”, I have a problem with get_pynq_buffer() function in the next section of code:
buffer = get_pynq_buffer(shape=(4,4), dtype=np.uint32) buffer
This time, It seems that there is a problem with “global_state_file_exists” in /usr/local/share/pynq-venv/lib/python3.8/site-packages/pynq/pl_server/embedded_device.py
I am wandering if I have missed something during the installation or made some mistakes.
Has anyone successfully run PYNQ / Ubuntu on Kria (which version of PYNQ/Ubuntu please)?