Skip to content

Commit f1476bd

Browse files
committed
Remove reference to dpctl.tensor from SyclTimer docstring
1 parent 687f8d4 commit f1476bd

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

dpctl/_sycl_timer.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -260,12 +260,11 @@ def dt(self):
260260
261261
device = tensor.Device.create_device(q)
262262
timer = dpctl.SyclTimer()
263+
x = np.linspace(-4, 4, num=10**6, dtype="float32")
263264
264265
with timer(q):
265-
x = tensor.linspace(-4, 4, num=10**6, dtype="float32")
266-
e = tensor.exp(-0.5 * tensor.square(x))
267-
s = tensor.sin(2.3 * x + 0.11)
268-
f = e * s
266+
x_usm = dpctl.memory.MemoryUSMDevice(x.nbytes, queue=q)
267+
q.memcpy(dest=x_usm, src=x, count=x.nbytes)
269268
270269
host_dt, device_dt = timer.dt
271270

0 commit comments

Comments
 (0)