Skip to content

Commit

Permalink
Minor fixes to test_enqueue_task
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Jun 29, 2014
1 parent 4cfa5d2 commit d1d4f1e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions test/test_wrapper.py
Expand Up @@ -659,7 +659,7 @@ def test_enqueue_task(ctx_factory):
""").build()
knl = prg.reverse

n = 1000000
n = 100
a = np.random.rand(n).astype(np.float32)
b = np.empty_like(a)

Expand All @@ -669,9 +669,10 @@ def test_enqueue_task(ctx_factory):
knl.set_args(buf1, buf2, np.int32(n))
cl.enqueue_task(queue, knl)

cl.enqueue_read_buffer(queue, buf2, b).wait()
cl.enqueue_copy(queue, b, buf2).wait()
assert la.norm(a[::-1] - b) == 0


if __name__ == "__main__":
# make sure that import failures get reported, instead of skipping the tests.
import pyopencl # noqa
Expand Down

0 comments on commit d1d4f1e

Please sign in to comment.