From 6526f804c27640604976f2d705cdf4c1c8a04dc8 Mon Sep 17 00:00:00 2001 From: Kaushik Kulkarni Date: Thu, 26 Aug 2021 14:07:57 -0500 Subject: [PATCH] loopy target: test to not take arbitrary values --- test/test_codegen.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/test_codegen.py b/test/test_codegen.py index 90cb68b..2eeeac9 100755 --- a/test/test_codegen.py +++ b/test/test_codegen.py @@ -1055,6 +1055,17 @@ def test_reduction_adds_deps(ctx_factory): out_dict["z"]) +def test_loopy_target_doesnot_take_arbit_args(ctx_factory): + # see https://github.com/inducer/pytato/issues/142 + ctx = ctx_factory() + cq = cl.CommandQueue(ctx) + + pt_prg = pt.generate_loopy(pt.zeros(10)) + + with pytest.raises(ValueError): + evt, (out, ) = pt_prg(cq, d="pytato_is_buggy") + + if __name__ == "__main__": if len(sys.argv) > 1: exec(sys.argv[1]) -- GitLab