From b1eacb5e7d139c0267f2d321152b741f3841e6e8 Mon Sep 17 00:00:00 2001
From: Matt Wala <wala1@illinois.edu>
Date: Sun, 21 May 2017 15:00:33 -0500
Subject: [PATCH] Add test.

---
 test/test_loopy.py | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/test/test_loopy.py b/test/test_loopy.py
index 4bb6a2726..f00477f6b 100644
--- a/test/test_loopy.py
+++ b/test/test_loopy.py
@@ -2231,6 +2231,29 @@ def test_struct_assignment(ctx_factory):
     knl(queue, N=200)
 
 
+def test_inames_conditional_generation(ctx_factory):
+    ctx = ctx_factory()
+    knl = lp.make_kernel(
+            "{[i,j,k]: 0 < k < i and 0 < j < 10 and 0 < i < 10}",
+            """
+            for k
+                ... gbarrier
+                <>tmp1 = 0
+            end
+            for j
+                ... gbarrier
+                <>tmp2 = i
+            end
+            """,
+            "...",
+            seq_dependencies=True)
+
+    knl = lp.tag_inames(knl, dict(i="g.0"))
+
+    with cl.CommandQueue(ctx) as queue:
+        knl(queue)
+
+
 if __name__ == "__main__":
     if len(sys.argv) > 1:
         exec(sys.argv[1])
-- 
GitLab