Skip to content

Shape counting should fail/warn if assumptions aren't provided.

In [4]: knl = lp.make_kernel(
   ...:     "{[i]: 0<=i<n}",
   ...:     """
   ...:     a[1] = 2
   ...:     a[0] = 3
   ...:     """,
   ...:     [lp.GlobalArg('a', dtype=int, shape=('n', )), ...])

Generates code without any error/warnings regarding the assumption that n>=2 was taken into account.

Edited by Kaushik Kulkarni