From f5a9e3faab8b8756041b61867239bf531a7749d8 Mon Sep 17 00:00:00 2001 From: vlad-perevezentsev Date: Wed, 16 Dec 2020 04:26:24 -0600 Subject: [PATCH] Add a new test to test_sycl_usm --- dpctl/tests/test_sycl_usm.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dpctl/tests/test_sycl_usm.py b/dpctl/tests/test_sycl_usm.py index 520cd8f8ff..82837a6c9e 100644 --- a/dpctl/tests/test_sycl_usm.py +++ b/dpctl/tests/test_sycl_usm.py @@ -52,6 +52,14 @@ def test_memory_create(self): self.assertEqual(mobj.nbytes, nbytes) self.assertTrue(hasattr(mobj, "__sycl_usm_array_interface__")) + @unittest.expectedFailure + @unittest.skipUnless( + dpctl.has_sycl_platforms(), "No SYCL devices except the default host device." + ) + def test_memory_create_with_np(self): + mobj = dpctl.memory.MemoryUSMShared(np.int64(16384)) + self.assertTrue(hasattr(mobj, "__sycl_usm_array_interface__")) + def _create_memory(self): nbytes = 1024 queue = dpctl.get_current_queue()