Skip to content

Commit 2acad24

Browse files
committed
No need to move the data to the host to confirm data identity
1 parent ad44b0e commit 2acad24

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

dpnp/tests/test_sycl_queue.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1357,14 +1357,14 @@ def test_basic(self, device_from, device_to):
13571357
y = x.to_device(device_to)
13581358

13591359
assert y.sycl_device == device_to
1360-
assert (x.asnumpy() == y.asnumpy()).all()
1360+
assert (x == y).all()
13611361

13621362
def test_to_queue(self):
13631363
x = dpnp.full(100, 2, dtype=dpnp.int64)
13641364
q_prof = dpctl.SyclQueue(x.sycl_device, property="enable_profiling")
13651365
y = x.to_device(q_prof)
13661366

1367-
assert (x.asnumpy() == y.asnumpy()).all()
1367+
assert (x == y).all()
13681368
assert_sycl_queue_equal(y.sycl_queue, q_prof)
13691369

13701370
def test_stream(self):
@@ -1373,13 +1373,13 @@ def test_stream(self):
13731373
q_exec = dpctl.SyclQueue(x.sycl_device)
13741374

13751375
y = x.to_device(q_prof, stream=q_exec)
1376-
assert (x.asnumpy() == y.asnumpy()).all()
1376+
assert (x == y).all()
13771377
assert_sycl_queue_equal(y.sycl_queue, q_prof)
13781378

13791379
q_exec = dpctl.SyclQueue(x.sycl_device)
13801380
_ = dpnp.linspace(0, 20, num=10**5, sycl_queue=q_exec)
13811381
y = x.to_device(q_prof, stream=q_exec)
1382-
assert (x.asnumpy() == y.asnumpy()).all()
1382+
assert (x == y).all()
13831383
assert_sycl_queue_equal(y.sycl_queue, q_prof)
13841384

13851385
def test_stream_no_sync(self):
@@ -1388,7 +1388,7 @@ def test_stream_no_sync(self):
13881388

13891389
for stream in [None, x.sycl_queue]:
13901390
y = x.to_device(q_prof, stream=stream)
1391-
assert (x.asnumpy() == y.asnumpy()).all()
1391+
assert (x == y).all()
13921392
assert_sycl_queue_equal(y.sycl_queue, q_prof)
13931393

13941394
@pytest.mark.parametrize(

0 commit comments

Comments
 (0)