Skip to content

Commit 3f7ddf9

Browse files
committed
Fixing a test which was double freeing the data
1 parent 7b9f5ac commit 3f7ddf9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

tests/simple/device.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ def simple_device(verbose=False):
4646
print_func(dev_ptr)
4747
b = af.Array(src=dev_ptr, dims=a.dims(), dtype=a.dtype(), is_device=True)
4848
display_func(b)
49-
af.lock_device_ptr(b)
50-
af.unlock_device_ptr(b)
49+
50+
c = af.randu(10,10)
51+
af.lock_device_ptr(c)
52+
af.unlock_device_ptr(c)
5153

5254
_util.tests['device'] = simple_device

0 commit comments

Comments
 (0)