Skip to content

Commit 574376e

Browse files
Add a new test to test_sycl_usm (#225)
1 parent f658e4b commit 574376e

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

dpctl/tests/test_sycl_usm.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,14 @@ def test_memory_create(self):
5252
self.assertEqual(mobj.nbytes, nbytes)
5353
self.assertTrue(hasattr(mobj, "__sycl_usm_array_interface__"))
5454

55+
@unittest.expectedFailure
56+
@unittest.skipUnless(
57+
dpctl.has_sycl_platforms(), "No SYCL devices except the default host device."
58+
)
59+
def test_memory_create_with_np(self):
60+
mobj = dpctl.memory.MemoryUSMShared(np.int64(16384))
61+
self.assertTrue(hasattr(mobj, "__sycl_usm_array_interface__"))
62+
5563
def _create_memory(self):
5664
nbytes = 1024
5765
queue = dpctl.get_current_queue()

0 commit comments

Comments
 (0)