Hi.
I ran some DPU and face recognition, edge detection example with no problems at all.
Then I started the selftest. There are quite some overlays had failed the test, Do I need to worry about this or this is a common thing.
Also how can I see the list of passed overlay test.
ubuntu@kria:~/doc/Kria-PYNQ$ sudo ./selftest.sh
[sudo] password for ubuntu:
/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq_composable/runtime_tests /home/ubuntu/doc/Kria-PYNQ
/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/pl_server/xrt_device.py:325: DeprecationWarning: There is no current event loop
self._loop = asyncio.get_event_loop()
/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/pl_server/embedded_device.py:660: ResourceWarning: unclosed file <_io.BufferedWriter name='/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/pl_server/_current_metadata.pkl'>
pickle.dump(parser, open(f"{STATE_DIR}/_current_metadata.pkl", "wb"))
ResourceWarning: Enable tracemalloc to get the object allocation traceback
============================================= test session starts =============================================
platform linux -- Python 3.10.6, pytest-7.2.0, pluggy-1.0.0
rootdir: /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq_composable/runtime_tests
plugins: dependency-0.5.1, timeout-2.1.0, dash-2.6.0, anyio-3.6.1
collected 4 items
test_apps.py FFFF [100%]
================================================== FAILURES ===================================================
_____________ test_diff_gaussians[DifferenceGaussians(pytest.overlay, VSource.OpenCV, VSink.DP)] ______________
obj = 'DifferenceGaussians(pytest.overlay, VSource.OpenCV, VSink.DP)'
@pytest.mark.parametrize('obj', apps)
def test_diff_gaussians(obj):
app = eval(obj)
> app.start()
test_apps.py:22:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../apps.py:127: in start
self._video.start()
../video.py:563: in start
self._video.start()
../video.py:465: in start
self._dp.configure(self.mode, PIXEL_RGB)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pynq_composable.video._DisplayPort object at 0xffff99cead40>
mode = VideoMode: width=1280 height=720 bpp=24 fps=60
pixelformat = <pynq.lib.video.common.PixelFormat object at 0xffffa0bb9c90>
def configure(self, mode, pixelformat):
"""Configure the display output
Raises an exception if the initialisation fails.
Parameters
----------
mode : VideoMode
The resolution to set the output display to
pixelformat : PixelFormat
The pixel format to use - must contain a fourcc
"""
if mode not in self.modes:
> raise ValueError("mode: {} is not supported".format(mode))
E ValueError: mode: VideoMode: width=1280 height=720 bpp=24 fps=60 is not supported
../../pynq/lib/video/drm.py:127: ValueError
_________________ test_diff_gaussians[CornerDetect(pytest.overlay, VSource.OpenCV, VSink.DP)] _________________
obj = 'CornerDetect(pytest.overlay, VSource.OpenCV, VSink.DP)'
@pytest.mark.parametrize('obj', apps)
def test_diff_gaussians(obj):
app = eval(obj)
> app.start()
test_apps.py:22:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../apps.py:127: in start
self._video.start()
../video.py:563: in start
self._video.start()
../video.py:465: in start
self._dp.configure(self.mode, PIXEL_RGB)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pynq_composable.video._DisplayPort object at 0xffff98d711b0>
mode = VideoMode: width=1280 height=720 bpp=24 fps=60
pixelformat = <pynq.lib.video.common.PixelFormat object at 0xffffa0bb9c90>
def configure(self, mode, pixelformat):
"""Configure the display output
Raises an exception if the initialisation fails.
Parameters
----------
mode : VideoMode
The resolution to set the output display to
pixelformat : PixelFormat
The pixel format to use - must contain a fourcc
"""
if mode not in self.modes:
> raise ValueError("mode: {} is not supported".format(mode))
E ValueError: mode: VideoMode: width=1280 height=720 bpp=24 fps=60 is not supported
../../pynq/lib/video/drm.py:127: ValueError
_________________ test_diff_gaussians[ColorDetect(pytest.overlay, VSource.OpenCV, VSink.DP)] __________________
obj = 'ColorDetect(pytest.overlay, VSource.OpenCV, VSink.DP)'
@pytest.mark.parametrize('obj', apps)
def test_diff_gaussians(obj):
app = eval(obj)
> app.start()
test_apps.py:22:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../apps.py:127: in start
self._video.start()
../video.py:563: in start
self._video.start()
../video.py:465: in start
self._dp.configure(self.mode, PIXEL_RGB)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pynq_composable.video._DisplayPort object at 0xffff9707ef50>
mode = VideoMode: width=1280 height=720 bpp=24 fps=60
pixelformat = <pynq.lib.video.common.PixelFormat object at 0xffffa0bb9c90>
def configure(self, mode, pixelformat):
"""Configure the display output
Raises an exception if the initialisation fails.
Parameters
----------
mode : VideoMode
The resolution to set the output display to
pixelformat : PixelFormat
The pixel format to use - must contain a fourcc
"""
if mode not in self.modes:
> raise ValueError("mode: {} is not supported".format(mode))
E ValueError: mode: VideoMode: width=1280 height=720 bpp=24 fps=60 is not supported
../../pynq/lib/video/drm.py:127: ValueError
__________________ test_diff_gaussians[EdgeDetect(pytest.overlay, VSource.OpenCV, VSink.DP)] __________________
obj = 'EdgeDetect(pytest.overlay, VSource.OpenCV, VSink.DP)'
@pytest.mark.parametrize('obj', apps)
def test_diff_gaussians(obj):
app = eval(obj)
> app.start()
test_apps.py:22:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
../apps.py:127: in start
self._video.start()
../video.py:563: in start
self._video.start()
../video.py:465: in start
self._dp.configure(self.mode, PIXEL_RGB)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <pynq_composable.video._DisplayPort object at 0xffff974b0d30>
mode = VideoMode: width=1280 height=720 bpp=24 fps=60
pixelformat = <pynq.lib.video.common.PixelFormat object at 0xffffa0bb9c90>
def configure(self, mode, pixelformat):
"""Configure the display output
Raises an exception if the initialisation fails.
Parameters
----------
mode : VideoMode
The resolution to set the output display to
pixelformat : PixelFormat
The pixel format to use - must contain a fourcc
"""
if mode not in self.modes:
> raise ValueError("mode: {} is not supported".format(mode))
E ValueError: mode: VideoMode: width=1280 height=720 bpp=24 fps=60 is not supported
../../pynq/lib/video/drm.py:127: ValueError
============================================== warnings summary ===============================================
../../pynqmetadata/frontends/metadata.py:6
/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynqmetadata/frontends/metadata.py:6: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
from distutils.command.install_headers import install_headers
test_apps.py::test_diff_gaussians[DifferenceGaussians(pytest.overlay, VSource.OpenCV, VSink.DP)]
/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/uio.py:74: DeprecationWarning: There is no current event loop
asyncio.get_event_loop().add_reader(self.uio, functools.partial(
test_apps.py::test_diff_gaussians[DifferenceGaussians(pytest.overlay, VSource.OpenCV, VSink.DP)]
test_apps.py::test_diff_gaussians[CornerDetect(pytest.overlay, VSource.OpenCV, VSink.DP)]
test_apps.py::test_diff_gaussians[ColorDetect(pytest.overlay, VSource.OpenCV, VSink.DP)]
test_apps.py::test_diff_gaussians[EdgeDetect(pytest.overlay, VSource.OpenCV, VSink.DP)]
/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/lib/video/drm.py:67: DeprecationWarning: There is no current event loop
self._loop = asyncio.get_event_loop()
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=========================================== short test summary info ===========================================
FAILED test_apps.py::test_diff_gaussians[DifferenceGaussians(pytest.overlay, VSource.OpenCV, VSink.DP)] - ValueError: mode: VideoMode: width=1280 height=720 bpp=24 fps=60 is not supported
FAILED test_apps.py::test_diff_gaussians[CornerDetect(pytest.overlay, VSource.OpenCV, VSink.DP)] - ValueError: mode: VideoMode: width=1280 height=720 bpp=24 fps=60 is not supported
FAILED test_apps.py::test_diff_gaussians[ColorDetect(pytest.overlay, VSource.OpenCV, VSink.DP)] - ValueError: mode: VideoMode: width=1280 height=720 bpp=24 fps=60 is not supported
FAILED test_apps.py::test_diff_gaussians[EdgeDetect(pytest.overlay, VSource.OpenCV, VSink.DP)] - ValueError: mode: VideoMode: width=1280 height=720 bpp=24 fps=60 is not supported
======================================= 4 failed, 6 warnings in 21.70s ========================================
/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/pl_server/xrt_device.py:325: DeprecationWarning: There is no current event loop
self._loop = asyncio.get_event_loop()
/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/pl_server/embedded_device.py:209: ResourceWarning: unclosed file <_io.BufferedReader name='/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/pl_server/_current_metadata.pkl'>
parser = pickle.load(open(metadata_state_file, "rb"))
ResourceWarning: Enable tracemalloc to get the object allocation traceback
============================================= test session starts =============================================
platform linux -- Python 3.10.6, pytest-7.2.0, pluggy-1.0.0
rootdir: /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq_composable/runtime_tests
plugins: dependency-0.5.1, timeout-2.1.0, dash-2.6.0, anyio-3.6.1
collected 11 items
test_composable.py ..........F [100%]
======================================================================= FAILURES =======================================================================
___________________________________________________________ test_data_movement_lut_negative ____________________________________________________________
create_composable = (<pynq.overlay.Overlay object at 0xffff95f9b700>, <pynq_composable.composable.Composable object at 0xffff91f38f70>)
@pytest.mark.timeout(60)
@pytest.mark.dependency(depends=["test_parser"])
def test_data_movement_lut_negative(create_composable):
ol, cpipe = create_composable
cpipe.lut_accel.kernel_type = XvLut.negative
pipeline = [cpipe.ps_video_in, cpipe.lut_accel, cpipe.ps_video_out]
cpipe.compose(pipeline)
"""Check if composed correctly"""
assert cpipe.current_pipeline == pipeline
mode = VideoMode(_cols, _rows, 24)
writechannel = ol.video.axi_vdma.writechannel
readchannel = ol.video.axi_vdma.readchannel
writechannel.mode = readchannel.mode = mode
writechannel.start()
readchannel.start()
frame = writechannel.newframe()
golden = np.empty(shape=frame.shape, dtype=np.uint8)
for c in range(frame.shape[1]):
value = c % 255
frame[:, c, :] = value
golden[:, c, :] = 255 - value
writechannel.writeframe(frame)
time.sleep(1)
res = readchannel.readframe()
writechannel.stop()
readchannel.stop()
> assert np.array_equal(golden, res)
E assert False
E + where False = <function array_equal at 0xffffa02f5510>(array([[[255, 255, 255],\n [254, 254, 254],\n [253, 253, 253],\n ...,\n [123, 123, 123],\n ...[253, 253, 253],\n ...,\n [123, 123, 123],\n [122, 122, 122],\n [121, 121, 121]]], dtype=uint8), PynqBuffer([[[255, 255, 255],\n [254, 254, 254],\n [253, 253, 253],\n ...,\n ... ...,\n [ 0, 0, 0],\n [ 0, 0, 0],\n [ 0, 0, 0]]], dtype=uint8))
E + where <function array_equal at 0xffffa02f5510> = np.array_equal
test_composable.py:190: AssertionError
=================================================================== warnings summary ===================================================================
../../pynqmetadata/frontends/metadata.py:6
/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynqmetadata/frontends/metadata.py:6: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
from distutils.command.install_headers import install_headers
test_composable.py::test_data_movement_fifo
/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/uio.py:74: DeprecationWarning: There is no current event loop
asyncio.get_event_loop().add_reader(self.uio, functools.partial(
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
=============================================================== short test summary info ================================================================
FAILED test_composable.py::test_data_movement_lut_negative - assert False
================================================= 1 failed, 10 passed, 2 warnings in 225.97s (0:03:45) =================================================
/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/pl_server/xrt_device.py:325: DeprecationWarning: There is no current event loop
self._loop = asyncio.get_event_loop()
/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/pl_server/embedded_device.py:209: ResourceWarning: unclosed file <_io.BufferedReader name='/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/pl_server/_current_metadata.pkl'>
parser = pickle.load(open(metadata_state_file, "rb"))
ResourceWarning: Enable tracemalloc to get the object allocation traceback
================================================================= test session starts ==================================================================
platform linux -- Python 3.10.6, pytest-7.2.0, pluggy-1.0.0
rootdir: /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq_composable/runtime_tests
plugins: dependency-0.5.1, timeout-2.1.0, dash-2.6.0, anyio-3.6.1
collected 15 items
test_mmio_partial_bitstreams.py ............... [100%]
=================================================================== warnings summary ===================================================================
../../pynqmetadata/frontends/metadata.py:6
/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynqmetadata/frontends/metadata.py:6: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
from distutils.command.install_headers import install_headers
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
====================================================== 15 passed, 1 warning in 318.27s (0:05:18) =======================================================
/home/ubuntu/doc/Kria-PYNQ
================================================================= test session starts ==================================================================
platform linux -- Python 3.10.6, pytest-7.2.0, pluggy-1.0.0
rootdir: /usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq_dpu/tests
plugins: dependency-0.5.1, timeout-2.1.0, dash-2.6.0, anyio-3.6.1
collected 9 items
../../../../usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq_dpu/tests/test_vart.py ..... [ 55%]
../../../../usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq_dpu/tests/test_xrt.py .... [100%]
=================================================================== warnings summary ===================================================================
../../../../usr/local/share/pynq-venv/lib/python3.10/site-packages/pynqmetadata/frontends/metadata.py:6
/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynqmetadata/frontends/metadata.py:6: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
from distutils.command.install_headers import install_headers
test_vart.py::test_dpu_overlay
/usr/local/share/pynq-venv/lib/python3.10/site-packages/pynq/pl_server/xrt_device.py:325: DeprecationWarning: There is no current event loop
self._loop = asyncio.get_event_loop()
-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
============================================================ 9 passed, 2 warnings in 14.47s ============================================================