From 65bb9bc9869824f811a47c6f8c6abcb170e0a60d Mon Sep 17 00:00:00 2001 From: Albert Wolant <44801854+awolant@users.noreply.github.com> Date: Mon, 12 Jun 2023 15:58:45 +0200 Subject: [PATCH] Skip DLPack CPU export test for incompatible Numpy (#4904) Signed-off-by: Albert Wolant --- dali/test/python/test_backend_impl.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dali/test/python/test_backend_impl.py b/dali/test/python/test_backend_impl.py index 6f5c10d1d96..75875f6a207 100644 --- a/dali/test/python/test_backend_impl.py +++ b/dali/test/python/test_backend_impl.py @@ -348,6 +348,12 @@ def test_tensor_str_sample(): def test_tensor_expose_dlpack_capsule(): + # TODO(awolant): Numpy versions for Python 3.6 and 3.7 do not + # support from_dlpack. When we upgrade DLPack support for DALI + # this test needs to be changed. + if not hasattr(np, "from_dlpack"): + raise SkipTest("Test requires Numpy DLPack support.") + arr = np.arange(20) tensor = TensorCPU(arr, "NHWC")