From 6873784a8a4832fb79a793f8ea3736f11f590032 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 10 Jul 2017 16:42:40 -0500 Subject: [PATCH] Fix: Fix PyOpenCLKernelExecutor.get_code to adequately preprocess arg_to_dtype so that get_typed_and_scheduled_kernel caching works --- loopy/target/pyopencl_execution.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loopy/target/pyopencl_execution.py b/loopy/target/pyopencl_execution.py index f7400d5d0..2da25ba39 100644 --- a/loopy/target/pyopencl_execution.py +++ b/loopy/target/pyopencl_execution.py @@ -688,7 +688,7 @@ class PyOpenCLKernelExecutor(KernelExecutorBase): def get_code(self, arg_to_dtype=None): def process_dtype(dtype): - if issubclass(dtype, np.generic): + if isinstance(dtype, type) and issubclass(dtype, np.generic): dtype = np.dtype(dtype) if isinstance(dtype, np.dtype): dtype = NumpyType(dtype, self.kernel.target) -- GitLab