diff --git a/loopy/auto_test.py b/loopy/auto_test.py index 6a4d559758bc1d7ca52e9dc4da1b7e503e22cc29..56ed87176f891d362ac0555024ef0d8098cd843e 100644 --- a/loopy/auto_test.py +++ b/loopy/auto_test.py @@ -518,9 +518,13 @@ def auto_test_vs_ref( args = None from loopy.kernel import kernel_state + from loopy.target.pyopencl import PyOpenCLTarget if test_knl.state not in [ kernel_state.PREPROCESSED, kernel_state.SCHEDULED]: + if isinstance(test_knl.target, PyOpenCLTarget): + test_knl = test_knl.copy(target=PyOpenCLTarget(ctx.devices[0])) + test_knl = lp.preprocess_kernel(test_knl) if not test_knl.schedule: diff --git a/loopy/target/pyopencl.py b/loopy/target/pyopencl.py index 8f371085e0f1655651397c16873f10a95a799f79..f24b115fd5a35af94e4a6d437550bccf86b5bee0 100644 --- a/loopy/target/pyopencl.py +++ b/loopy/target/pyopencl.py @@ -335,6 +335,8 @@ class PyOpenCLTarget(OpenCLTarget): % dev_id) def preprocess(self, kernel): + if self.device is not None: + kernel = adjust_local_temp_var_storage(kernel, self.device) return kernel def pre_codegen_check(self, kernel): diff --git a/loopy/version.py b/loopy/version.py index 8516ce006bde8b8616172a72a766ec86dfcd44f1..02244f55d0dbf207a4641c3ebf6cc33b536f0421 100644 --- a/loopy/version.py +++ b/loopy/version.py @@ -32,4 +32,4 @@ except ImportError: else: _islpy_version = islpy.version.VERSION_TEXT -DATA_MODEL_VERSION = "v63-islpy%s" % _islpy_version +DATA_MODEL_VERSION = "v64-islpy%s" % _islpy_version