From 31a77122c8310df34150c6cbc588b478547e0d0d Mon Sep 17 00:00:00 2001
From: Andreas Kloeckner <inform@tiker.net>
Date: Sun, 19 Apr 2015 12:42:49 -0500
Subject: [PATCH] Setting insn_deps_is_final requires setting insn_deps

---
 loopy/kernel/data.py | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/loopy/kernel/data.py b/loopy/kernel/data.py
index 871f5359b..ab747b9a6 100644
--- a/loopy/kernel/data.py
+++ b/loopy/kernel/data.py
@@ -28,10 +28,10 @@ THE SOFTWARE.
 import numpy as np
 from pytools import Record, memoize_method
 from loopy.kernel.array import ArrayBase
-from loopy.diagnostic import LoopyError  # noqa
+from loopy.diagnostic import LoopyError
 
 
-class auto(object):
+class auto(object):  # noqa
     """A generic placeholder object for something that should be automatically
     detected.  See, for example, the *shape* or *strides* argument of
     :class:`GlobalArg`.
@@ -484,6 +484,10 @@ class InstructionBase(Record):
         if insn_deps_is_final is None:
             insn_deps_is_final = False
 
+        if insn_deps_is_final and not isinstance(insn_deps, frozenset):
+            raise LoopyError("Setting insn_deps_is_final to True requires "
+                    "actually specifying insn_deps")
+
         if tags is None:
             tags = ()
 
-- 
GitLab