Skip to content

Commit

Permalink
feat: remove force_device_scalars=True from examples
Browse files Browse the repository at this point in the history
  • Loading branch information
alexfikl authored and inducer committed Feb 8, 2025
1 parent da0e628 commit 71d55c5
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion examples/from_firedrake.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ def main(visualize=True):
# Make connections
cl_ctx = cl.create_some_context()
queue = cl.CommandQueue(cl_ctx)
actx = PyOpenCLArrayContext(queue, force_device_scalars=True)
actx = PyOpenCLArrayContext(queue)

fd_connection = build_connection_from_firedrake(actx, fd_fspace)
fd_bdy_connection = \
Expand Down
2 changes: 1 addition & 1 deletion examples/moving-geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ def source(t, x):
if __name__ == "__main__":
cl_ctx = cl.create_some_context()
queue = cl.CommandQueue(cl_ctx)
actx = PyOpenCLArrayContext(queue, force_device_scalars=True)
actx = PyOpenCLArrayContext(queue)

from pytools import ProcessTimer
for _ in range(1):
Expand Down
2 changes: 1 addition & 1 deletion examples/plot-connectivity.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
def main():
cl_ctx = cl.create_some_context()
queue = cl.CommandQueue(cl_ctx)
actx = PyOpenCLArrayContext(queue, force_device_scalars=True)
actx = PyOpenCLArrayContext(queue)

from meshmode.mesh.generation import ( # noqa: F401
generate_icosahedron,
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-dg.py
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ def main(lazy=False):

cl_ctx = cl.create_some_context()
queue = cl.CommandQueue(cl_ctx)
actx_outer = PyOpenCLArrayContext(queue, force_device_scalars=True)
actx_outer = PyOpenCLArrayContext(queue)
if lazy:
actx_rhs = PytatoPyOpenCLArrayContext(queue)
else:
Expand Down
2 changes: 1 addition & 1 deletion examples/to_firedrake.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def main():

cl_ctx = cl.create_some_context()
queue = cl.CommandQueue(cl_ctx)
actx = PyOpenCLArrayContext(queue, force_device_scalars=True)
actx = PyOpenCLArrayContext(queue)

nel_1d = 16
from meshmode.mesh.generation import generate_regular_rect_mesh
Expand Down
2 changes: 1 addition & 1 deletion examples/tp-lagrange-stl.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
def main():
cl_ctx = cl.create_some_context()
queue = cl.CommandQueue(cl_ctx)
actx = PyOpenCLArrayContext(queue, force_device_scalars=True)
actx = PyOpenCLArrayContext(queue)

npts1d = 100 # use 300 for actual print
rs_coords = np.linspace(-1, 1, npts1d)
Expand Down
2 changes: 1 addition & 1 deletion meshmode/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,4 @@ def _acf():

context = cl._csc()
queue = cl.CommandQueue(context)
return PyOpenCLArrayContext(queue, force_device_scalars=True)
return PyOpenCLArrayContext(queue)
2 changes: 1 addition & 1 deletion test/test_partition.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ def _test_mpi_boundary_swap(dim, order, num_groups):
from meshmode.array_context import PyOpenCLArrayContext
cl_ctx = cl.create_some_context()
queue = cl.CommandQueue(cl_ctx)
actx = PyOpenCLArrayContext(queue, force_device_scalars=True)
actx = PyOpenCLArrayContext(queue)

from meshmode.discretization import Discretization
vol_discr = Discretization(actx, local_mesh, group_factory)
Expand Down

0 comments on commit 71d55c5

Please sign in to comment.