loopy
loopy copied to clipboard
[callables] Overwriting dtypes at a call-site should be illegal
The following translation unit:
alpha_set = lp.make_function(
"{[i]: 0<=i<10}",
"""
y[i] = alpha
""", [lp.ValueArg("alpha", dtype=np.float64),
...],
name="alpha_set")
knl = lp.make_kernel(
"{[i]: 0<=i<10}",
"""
<>tmp = 3.14f
[i]: Y[i] = alpha_set(tmp)
""")
changes the dtype of alpha in the kernel alpha_set to np.float32.