From b47307af9dd617f4d8fce0c402bc2a91f80f5151 Mon Sep 17 00:00:00 2001 From: Matt Wala Date: Mon, 11 Sep 2017 17:40:47 -0500 Subject: [PATCH] PyOpenCL executor: Don't uniquify instructions. Uniquifying the instructions involves traversing the instruction list which we would like to avoid in the path from loading from cache to execution. Related: #67. --- loopy/target/pyopencl_execution.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/loopy/target/pyopencl_execution.py b/loopy/target/pyopencl_execution.py index 2da25ba39..d059add09 100644 --- a/loopy/target/pyopencl_execution.py +++ b/loopy/target/pyopencl_execution.py @@ -642,7 +642,9 @@ class PyOpenCLKernelExecutor(KernelExecutorBase): from loopy.target.pyopencl import PyOpenCLTarget if isinstance(kernel.target, PyOpenCLTarget): - self.kernel = kernel.copy(target=PyOpenCLTarget(context.devices[0])) + self.kernel = kernel.copy( + target=PyOpenCLTarget(context.devices[0]), + uniquify_instruction_ids=False) @memoize_method def cl_kernel_info(self, arg_to_dtype_set=frozenset(), all_kwargs=None): -- GitLab