Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simplify asserts in dlpack tests #1310

Merged
merged 4 commits into from
Feb 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions tests/test_sycl_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -862,8 +862,7 @@ def test_from_dlpack(arr_dtype, shape, device):
Y = dpnp.from_dlpack(X)
assert_array_equal(X, Y)
assert X.__dlpack_device__() == Y.__dlpack_device__()
assert X.sycl_device == Y.sycl_device
assert X.sycl_context == Y.sycl_context
assert_sycl_queue_equal(X.sycl_queue, Y.sycl_queue)
assert X.usm_type == Y.usm_type
if Y.ndim:
V = Y[::-1]
Expand All @@ -882,6 +881,5 @@ def test_from_dlpack_with_dpt(arr_dtype, device):
assert_array_equal(X, Y)
assert isinstance(Y, dpnp.dpnp_array.dpnp_array)
assert X.__dlpack_device__() == Y.__dlpack_device__()
assert X.sycl_device == Y.sycl_device
assert X.sycl_context == Y.sycl_context
assert X.usm_type == Y.usm_type
assert_sycl_queue_equal(X.sycl_queue, Y.sycl_queue)