Skip to content

Commit 2d793c9

Browse files
relaxed requirement for host_dt > device_dt. These are different timers, and the inequality expectation is not warranted due to coarsness and accuracy of these different timers
1 parent cac634c commit 2d793c9

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

dpctl/tests/test_sycl_event.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,15 +196,15 @@ def test_sycl_timer():
196196
except dpctl.SyclQueueCreationError:
197197
pytest.skip("Queue creation of default device failed")
198198
timer = dpctl.SyclTimer()
199-
m1 = dpctl_mem.MemoryUSMDevice(256 * 1024, queue=q)
200-
m2 = dpctl_mem.MemoryUSMDevice(256 * 1024, queue=q)
199+
m1 = dpctl_mem.MemoryUSMDevice(1024 * 1024, queue=q)
200+
m2 = dpctl_mem.MemoryUSMDevice(1024 * 1024, queue=q)
201201
with timer(q):
202202
# device task
203203
m1.copy_from_device(m2)
204-
# host task
205-
[x**2 for x in range(1024)]
204+
# host operation
205+
[x**2 for x in range(128 * 1024)]
206206
host_dt, device_dt = timer.dt
207-
assert host_dt > device_dt
207+
assert host_dt > device_dt or (host_dt > 0 and device_dt >= 0)
208208
q_no_profiling = dpctl.SyclQueue()
209209
assert q_no_profiling.has_enable_profiling is False
210210
with pytest.raises(ValueError):

0 commit comments

Comments
 (0)