From 6f2a16b40ad415aa7d66ee4eeb07cdb45d59bcb4 Mon Sep 17 00:00:00 2001
From: Kaushik Kulkarni <kaushikcfd@gmail.com>
Date: Fri, 18 Jun 2021 09:09:57 -0500
Subject: [PATCH] pyopenclarraycontext: revert back to return an error

---
 arraycontext/impl/pyopencl.py | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/arraycontext/impl/pyopencl.py b/arraycontext/impl/pyopencl.py
index 575919e..fa2aa74 100644
--- a/arraycontext/impl/pyopencl.py
+++ b/arraycontext/impl/pyopencl.py
@@ -346,9 +346,10 @@ class PyOpenCLArrayContext(ArrayContext):
             if "i1" in all_inames:
                 inner_iname = "i1"
         else:
-            # cannot "fit" the optimization strategy for the provided kernel
-            # => bail
-            return t_unit
+            raise RuntimeError(
+                "Unable to reason what outer_iname and inner_iname "
+                f"needs to be; all_inames is given as: {all_inames}"
+            )
 
         if inner_iname is not None:
             t_unit = lp.split_iname(t_unit, inner_iname, 16, inner_tag="l.0")
-- 
GitLab