From 7160874c791202b9609625d2992f37744523c1b4 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Tue, 11 Jul 2017 17:28:08 -0500 Subject: [PATCH 1/3] Inject knowledge of target device into kernel during auto_test --- loopy/auto_test.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/loopy/auto_test.py b/loopy/auto_test.py index 6a4d55975..56ed87176 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: -- GitLab From 973dfee1b07261c249a22c86034f6b2eeeb24853 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Tue, 11 Jul 2017 17:28:45 -0500 Subject: [PATCH 2/3] Make sure bank-conflic-local-storage adjuster gets called during preprocessing for known devices (Fixes #72 on Gitlab) --- loopy/target/pyopencl.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/loopy/target/pyopencl.py b/loopy/target/pyopencl.py index 8f371085e..f24b115fd 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): -- GitLab From 410ff487652afb308607564ee050d152b0dfa004 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Tue, 11 Jul 2017 17:28:53 -0500 Subject: [PATCH 3/3] Bump kernel version --- loopy/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/loopy/version.py b/loopy/version.py index 8516ce006..02244f55d 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 -- GitLab