Skip to content

Commit

Permalink
Removed exceptions from tests now that bool is supported by DLPack
Browse files Browse the repository at this point in the history
  • Loading branch information
oleksandr-pavlyk committed Feb 16, 2023
1 parent 0bc9bac commit 84b0232
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions dpctl/tests/test_usm_ndarray_dlpack.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,7 @@ def test_from_dlpack(shape, typestr, usm_type):
X = dpt.empty(shape, dtype=typestr, usm_type=usm_type, device=sycl_dev)
Y = dpt.from_dlpack(X)
assert X.shape == Y.shape
assert X.dtype == Y.dtype or (
str(X.dtype) == "bool" and str(Y.dtype) == "uint8"
)
assert X.dtype == Y.dtype
assert X.sycl_device == Y.sycl_device
assert X.usm_type == Y.usm_type
assert X._pointer == Y._pointer
Expand All @@ -125,9 +123,7 @@ def test_from_dlpack_strides(mod, typestr, usm_type):
X = X0[slice(-start - 1, None, -mod)]
Y = dpt.from_dlpack(X)
assert X.shape == Y.shape
assert X.dtype == Y.dtype or (
str(X.dtype) == "bool" and str(Y.dtype) == "uint8"
)
assert X.dtype == Y.dtype
assert X.sycl_device == Y.sycl_device
assert X.usm_type == Y.usm_type
assert X._pointer == Y._pointer
Expand Down

0 comments on commit 84b0232

Please sign in to comment.