Skip to content

Commit

Permalink
enable force_device_scalars by default
Browse files Browse the repository at this point in the history
  • Loading branch information
majosm authored and inducer committed Aug 19, 2024
1 parent ed46051 commit edf580b
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions grudge/array_context.py
Original file line number Diff line number Diff line change
Expand Up @@ -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. "
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit edf580b

Please sign in to comment.