diff --git a/test/test_domain.py b/test/test_domain.py index e01c3a937fd95984a27a7f2490edf4be12d9b57b..9d0379a50af188cc84de8e01f8278030b6cc04e2 100644 --- a/test/test_domain.py +++ b/test/test_domain.py @@ -229,6 +229,41 @@ def test_dependent_loop_bounds_3(ctx_factory): list(lp.generate_loop_schedules(knl_bad)) +def test_dependent_loop_bounds_4(): + # https://gitlab.tiker.net/inducer/loopy/issues/23 + import loopy as lp + + loopy_knl = lp.make_kernel( + [ + "{[a]: 0<=a<10}", + "{[b]: b_start<=b b_start = 1 + <> b_end = 2 + for b + <> c_start = 1 + <> c_end = 2 + + for c + ... nop + end + + <>t[idim] = 1 + end + end + """, + "...", + seq_dependencies=True) + + loopy_knl = lp.fix_parameters(loopy_knl, dim=3) + + with lp.CacheMode(False): + lp.generate_code_v2(loopy_knl) + + def test_independent_multi_domain(ctx_factory): dtype = np.dtype(np.float32) ctx = ctx_factory()