Skip to content

Commit 1bb9a14

Browse files
majosminducer
authored andcommitted
enable force_device_scalars by default
1 parent ed46051 commit 1bb9a14

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

grudge/array_context.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ class PyOpenCLArrayContext(_PyOpenCLArrayContextBase):
128128
def __init__(self, queue: "pyopencl.CommandQueue",
129129
allocator: Optional["pyopencl.tools.AllocatorBase"] = None,
130130
wait_event_queue_length: Optional[int] = None,
131-
force_device_scalars: bool = False) -> None:
131+
force_device_scalars: bool = True) -> None:
132132

133133
if allocator is None:
134134
warn("No memory allocator specified, please pass one. "
@@ -446,7 +446,7 @@ def __init__(self,
446446
queue: "pyopencl.CommandQueue",
447447
*, allocator: Optional["pyopencl.tools.AllocatorBase"] = None,
448448
wait_event_queue_length: Optional[int] = None,
449-
force_device_scalars: bool = False) -> None:
449+
force_device_scalars: bool = True) -> None:
450450
"""
451451
See :class:`arraycontext.impl.pyopencl.PyOpenCLArrayContext` for most
452452
arguments.
@@ -535,13 +535,6 @@ def __call__(self):
535535
return self.actx_class(queue, allocator=alloc)
536536

537537

538-
# deprecated
539-
class PytestPyOpenCLArrayContextFactoryWithHostScalars(
540-
_PytestPyOpenCLArrayContextFactoryWithClass):
541-
actx_class = PyOpenCLArrayContext
542-
force_device_scalars = False
543-
544-
545538
register_pytest_array_context_factory("grudge.pyopencl",
546539
PytestPyOpenCLArrayContextFactory)
547540
register_pytest_array_context_factory("grudge.pytato-pyopencl",

0 commit comments

Comments
 (0)