Skip to content

Fix typo in tag_inames#217

Merged
inducer merged 2 commits into
inducer:masterfrom
alexfikl:fix-typo-tag-inames
Feb 3, 2021
Merged

Fix typo in tag_inames#217
inducer merged 2 commits into
inducer:masterfrom
alexfikl:fix-typo-tag-inames

Conversation

@alexfikl

@alexfikl alexfikl commented Feb 3, 2021

Copy link
Copy Markdown
Contributor

No description provided.

@kaushikcfd kaushikcfd left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you. Could you please also add a test:

diff --git a/test/test_transform.py b/test/test_transform.py
index cdfa02d3..575a2750 100644
--- a/test/test_transform.py
+++ b/test/test_transform.py
@@ -731,6 +731,22 @@ def test_rename_argument_with_assumptions():
             == knl.assumptions)
 
 
+def test_tag_iname_with_match_pattern():
+    knl = lp.make_kernel(
+            "{[i0, i1]: 0<=i0, i1<n}",
+            """
+            x[i0] = 2.0f
+            y[i1] = 2.0f
+            """)
+
+    knl = lp.tag_inames(knl, "i*: unr")
+    i0_tag, = knl.inames["i0"].tags
+    i1_tag, = knl.inames["i0"].tags
+
+    assert str(i0_tag) == "unr"
+    assert str(i1_tag) == "unr"
+
+
 if __name__ == "__main__":
     if len(sys.argv) > 1:
         exec(sys.argv[1])

@alexfikl

alexfikl commented Feb 3, 2021

Copy link
Copy Markdown
Contributor Author

Thank you. Could you please also add a test

Done! Thanks for the diff!

@inducer inducer merged commit 0411881 into inducer:master Feb 3, 2021
@inducer

inducer commented Feb 3, 2021

Copy link
Copy Markdown
Owner

Thanks to the both of you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants