Skip to content

Commit

Permalink
test access race checking for non-zero hw loops offset
Browse files Browse the repository at this point in the history
  • Loading branch information
kaushikcfd committed Jan 20, 2024
1 parent 2fd42aa commit 4e11957
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions test/test_loopy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 4e11957

Please sign in to comment.