From 241707c419e5be0f0a6acbe6a6169a86f66e1bb0 Mon Sep 17 00:00:00 2001 From: Andreas Kloeckner Date: Thu, 20 Jul 2023 20:02:08 -0500 Subject: [PATCH] Drop long-deprecated CompiledKernel --- doc/ref_other.rst | 3 --- loopy/__init__.py | 3 --- loopy/compiled.py | 41 ----------------------------------------- loopy/kernel/array.py | 3 --- 4 files changed, 50 deletions(-) delete mode 100644 loopy/compiled.py diff --git a/doc/ref_other.rst b/doc/ref_other.rst index b13f39869..13073ec94 100644 --- a/doc/ref_other.rst +++ b/doc/ref_other.rst @@ -16,10 +16,7 @@ Controlling caching Running Kernels --------------- -In addition to simply calling kernels using :meth:`LoopKernel.__call__`, -the following underlying functionality may be used: -.. autoclass:: CompiledKernel Automatic Testing ----------------- diff --git a/loopy/__init__.py b/loopy/__init__.py index 4796c1f59..dd048a7d5 100644 --- a/loopy/__init__.py +++ b/loopy/__init__.py @@ -147,7 +147,6 @@ from loopy.codegen import ( from loopy.codegen.result import ( GeneratedProgram, CodeGenerationResult) -from loopy.compiled import CompiledKernel from loopy.options import Options from loopy.auto_test import auto_test_vs_ref from loopy.frontend.fortran import (c_preprocess, parse_transformed_fortran, @@ -293,8 +292,6 @@ __all__ = [ "gather_access_footprints", "gather_access_footprint_bytes", "Sync", - "CompiledKernel", - "auto_test_vs_ref", "Options", diff --git a/loopy/compiled.py b/loopy/compiled.py deleted file mode 100644 index 0fa18eacb..000000000 --- a/loopy/compiled.py +++ /dev/null @@ -1,41 +0,0 @@ -__copyright__ = "Copyright (C) 2016 Andreas Kloeckner" - -__license__ = """ -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -""" - - -from loopy.target.pyopencl_execution import ( # noqa - PyOpenCLKernelExecutor) - - -# {{{ compatibility - -class CompiledKernel(PyOpenCLKernelExecutor): - """ - .. automethod:: __call__ - """ - def __init__(self, context, kernel, entrypoint): - from warnings import warn - warn("CompiledKernel is deprecated. Use LoopKernel.__call__ directly.", - DeprecationWarning, stacklevel=2) - - super().__init__(context, kernel, entrypoint) - -# }}} diff --git a/loopy/kernel/array.py b/loopy/kernel/array.py index dd182211b..c3b2a0227 100644 --- a/loopy/kernel/array.py +++ b/loopy/kernel/array.py @@ -654,9 +654,6 @@ class ArrayBase(ImmutableRecord, Taggable): * a pymbolic expression * :class:`loopy.auto`, in which case an offset argument is added automatically, immediately following this argument. - :class:`loopy.CompiledKernel` is even smarter in its treatment of - this case and will compile custom versions of the kernel based on - whether the passed arrays have offsets or not. .. attribute:: dim_names -- GitLab