From 3a464ecfc75c06b430930690847c30d6929ffc7c Mon Sep 17 00:00:00 2001
From: Matthias Diener <mdiener@illinois.edu>
Date: Mon, 24 Jul 2023 22:07:29 -0500
Subject: [PATCH] assert that options have return_dict set

---
 arraycontext/impl/pytato/__init__.py | 5 ++++-
 arraycontext/impl/pytato/compile.py  | 5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/arraycontext/impl/pytato/__init__.py b/arraycontext/impl/pytato/__init__.py
index 3ad3d70..8d3b678 100644
--- a/arraycontext/impl/pytato/__init__.py
+++ b/arraycontext/impl/pytato/__init__.py
@@ -527,8 +527,11 @@ class PytatoPyOpenCLArrayContext(_BasePytatoArrayContext):
                         transformed_dag, function_name)
 
             from arraycontext.loopy import _DEFAULT_LOOPY_OPTIONS
+            opts = _DEFAULT_LOOPY_OPTIONS
+            assert opts.return_dict
+
             pt_prg = pt.generate_loopy(transformed_dag,
-                                       options=_DEFAULT_LOOPY_OPTIONS,
+                                       options=opts,
                                        cl_device=self.queue.device,
                                        function_name=function_name,
                                        target=self.get_target())
diff --git a/arraycontext/impl/pytato/compile.py b/arraycontext/impl/pytato/compile.py
index 9e7a72c..c499687 100644
--- a/arraycontext/impl/pytato/compile.py
+++ b/arraycontext/impl/pytato/compile.py
@@ -414,9 +414,12 @@ class LazilyPyOpenCLCompilingFunctionCaller(BaseLazilyCompilingFunctionCaller):
 
         with ProcessLogger(logger, f"generate_loopy for '{prg_id}'"):
             from arraycontext.loopy import _DEFAULT_LOOPY_OPTIONS
+            opts = _DEFAULT_LOOPY_OPTIONS
+            assert opts.return_dict
+
             pytato_program = pt.generate_loopy(
                     pt_dict_of_named_arrays,
-                    options=_DEFAULT_LOOPY_OPTIONS,
+                    options=opts,
                     function_name=_prg_id_to_kernel_name(prg_id),
                     target=self.actx.get_target(),
                     )
-- 
GitLab