From edf580b490656d6d36e926e84a748693c7a18128 Mon Sep 17 00:00:00 2001 From: Matthew Smith Date: Wed, 14 Aug 2024 16:11:15 -0500 Subject: [PATCH] enable force_device_scalars by default --- grudge/array_context.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/grudge/array_context.py b/grudge/array_context.py index 6c31e672..674dac8d 100644 --- a/grudge/array_context.py +++ b/grudge/array_context.py @@ -128,7 +128,7 @@ class PyOpenCLArrayContext(_PyOpenCLArrayContextBase): def __init__(self, queue: "pyopencl.CommandQueue", allocator: Optional["pyopencl.tools.AllocatorBase"] = None, wait_event_queue_length: Optional[int] = None, - force_device_scalars: bool = False) -> None: + force_device_scalars: bool = True) -> None: if allocator is None: warn("No memory allocator specified, please pass one. " @@ -446,7 +446,7 @@ def __init__(self, queue: "pyopencl.CommandQueue", *, allocator: Optional["pyopencl.tools.AllocatorBase"] = None, wait_event_queue_length: Optional[int] = None, - force_device_scalars: bool = False) -> None: + force_device_scalars: bool = True) -> None: """ See :class:`arraycontext.impl.pyopencl.PyOpenCLArrayContext` for most arguments. @@ -535,13 +535,6 @@ def __call__(self): return self.actx_class(queue, allocator=alloc) -# deprecated -class PytestPyOpenCLArrayContextFactoryWithHostScalars( - _PytestPyOpenCLArrayContextFactoryWithClass): - actx_class = PyOpenCLArrayContext - force_device_scalars = False - - register_pytest_array_context_factory("grudge.pyopencl", PytestPyOpenCLArrayContextFactory) register_pytest_array_context_factory("grudge.pytato-pyopencl",