From be6f6812da46d45be36dd531f60b06cea28e57c8 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner <inform@tiker.net> Date: Fri, 5 Aug 2016 00:44:58 -0500 Subject: [PATCH] SVM fixes --- pyopencl/__init__.py | 2 +- pyopencl/cffi_cl.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyopencl/__init__.py b/pyopencl/__init__.py index 166601f2..8bf931ed 100644 --- a/pyopencl/__init__.py +++ b/pyopencl/__init__.py @@ -1068,7 +1068,7 @@ def svm_empty(ctx, flags, shape, dtype, order="C", alignment=None): alignment = itemsize svm_alloc = SVMAllocation(ctx, nbytes, alignment, flags, _interface=interface) - return SVM(np.asarray(svm_alloc)) + return np.asarray(svm_alloc) def svm_empty_like(ctx, flags, ary, alignment=None): diff --git a/pyopencl/cffi_cl.py b/pyopencl/cffi_cl.py index 31df8050..5893fc24 100644 --- a/pyopencl/cffi_cl.py +++ b/pyopencl/cffi_cl.py @@ -1660,7 +1660,7 @@ class Kernel(_Common): status = _lib.kernel__set_arg_null(self.ptr, {arg_idx}) if status != _ffi.NULL: _handle_error(status) - else: + elif isinstance({arg_var}, _cl._CLKernelArg): self._set_arg_clkernelarg({arg_idx}, {arg_var}) """ .format(arg_idx=arg_idx, arg_var=arg_var)) -- GitLab