From bd5dc00850c005aa8393012d45d5db99d65ec42c Mon Sep 17 00:00:00 2001 From: Kaushik Kulkarni Date: Sat, 4 Nov 2023 21:13:41 -0700 Subject: [PATCH] test access race checking for non-zero hw loops offset --- test/test_loopy.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/test_loopy.py b/test/test_loopy.py index b81d3fe0b..55d64462a 100644 --- a/test/test_loopy.py +++ b/test/test_loopy.py @@ -3626,6 +3626,24 @@ def test_modulo_vs_type_context(ctx_factory): t_unit(queue) +def test_barrier_non_zero_hw_lbound(): + t_unit = lp.make_kernel( + ["{[i]: 1<=i<17}", + "{[j]: 0<=j<16}"], + """ + <> a[i] = i {id=w_a} + <> b[j] = 2*a[j] {id=w_b} + """) + + t_unit = lp.tag_inames(t_unit, {"i": "l.0", "j": "l.0"}) + + t_unit = lp.preprocess_kernel(t_unit) + knl = lp.get_one_linearized_kernel(t_unit.default_entrypoint, + t_unit.callables_table) + + assert barrier_between(knl, "w_a", "w_b") + + if __name__ == "__main__": if len(sys.argv) > 1: exec(sys.argv[1])