From 064f9be6103ab285e807cd1b774ce0da9aeca9e3 Mon Sep 17 00:00:00 2001
From: "Rebecca N. Palmer" <rebecca_palmer@zoho.com>
Date: Tue, 7 Aug 2018 22:20:14 +0100
Subject: [PATCH] fix bug in async Array.set

---
 pyopencl/array.py | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/pyopencl/array.py b/pyopencl/array.py
index a1cbb424..704c495b 100644
--- a/pyopencl/array.py
+++ b/pyopencl/array.py
@@ -624,8 +624,7 @@ class Array(object):
             event1 = cl.enqueue_copy(queue or self.queue, self.base_data, ary,
                     device_offset=self.offset,
                     is_blocking=not async_)
-            if not async_:  # not already waited for
-                self.add_event(event1)
+            self.add_event(event1)
 
     def get(self, queue=None, ary=None, async_=None, **kwargs):
         """Transfer the contents of *self* into *ary* or a newly allocated
-- 
GitLab