From 179265258997da6f3a5aeb72001f56540dccdc14 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Mon, 20 Aug 2018 15:29:19 -0500 Subject: [PATCH] [pybind] Add pypy workaround for enqueue_fill_buffer --- pyopencl/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyopencl/__init__.py b/pyopencl/__init__.py index b91daedf..d0904c29 100644 --- a/pyopencl/__init__.py +++ b/pyopencl/__init__.py @@ -1831,6 +1831,10 @@ def enqueue_fill_buffer(queue, mem, pattern, offset, size, wait_for=None): from warnings import warn warn("The context for this queue does not declare OpenCL 1.2 support, so " "the next thing you might see is a crash") + + if _PYPY and isinstance(pattern, np.generic): + pattern = np.asarray(pattern) + return _cl._enqueue_fill_buffer(queue, mem, pattern, offset, size, wait_for) # }}} -- GitLab