From 7064465ce1d92b3640fe9a95909713ee212c6d01 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Mon, 7 Dec 2020 18:26:27 -0600 Subject: [PATCH] Stop using pytools.{any,all} --- pyopencl/algorithm.py | 1 - pyopencl/reduction.py | 1 - pyopencl/scan.py | 2 -- pyopencl/tools.py | 1 - 4 files changed, 5 deletions(-) diff --git a/pyopencl/algorithm.py b/pyopencl/algorithm.py index 197ad948..c4eb43ea 100644 --- a/pyopencl/algorithm.py +++ b/pyopencl/algorithm.py @@ -911,7 +911,6 @@ class ListOfListsBuilder: devices=self.devices) def do_not_vectorize(self): - from pytools import any return (self.complex_kernel and any(dev.type & cl.device_type.CPU for dev in self.context.devices)) diff --git a/pyopencl/reduction.py b/pyopencl/reduction.py index 6eebe729..7d6c6482 100644 --- a/pyopencl/reduction.py +++ b/pyopencl/reduction.py @@ -156,7 +156,6 @@ def _get_reduction_source( # }}} from mako.template import Template - from pytools import all from pyopencl.characterize import has_double_support arguments = ", ".join(arg.declarator() for arg in parsed_args) diff --git a/pyopencl/scan.py b/pyopencl/scan.py index 24b75906..0106207c 100644 --- a/pyopencl/scan.py +++ b/pyopencl/scan.py @@ -1079,7 +1079,6 @@ class _GenericScanKernelBase: # {{{ set up shared code dict - from pytools import all from pyopencl.characterize import has_double_support self.code_variables = dict( @@ -1258,7 +1257,6 @@ class GenericScanKernel(_GenericScanKernelBase): solutions.append((wg_size*k_group_size, k_group_size, wg_size)) if is_gpu: - from pytools import any for wg_size_floor in [256, 192, 128]: have_sol_above_floor = any(wg_size >= wg_size_floor for _, _, wg_size in solutions) diff --git a/pyopencl/tools.py b/pyopencl/tools.py index a5ab75ce..5b814685 100644 --- a/pyopencl/tools.py +++ b/pyopencl/tools.py @@ -657,7 +657,6 @@ def match_dtype_to_c_struct(device, name, dtype, context=None): size = int(size_and_offsets[0]) - from pytools import any offsets = size_and_offsets[1:] if any(ofs >= size for ofs in offsets): # offsets not plausible -- GitLab