loopy icon indicating copy to clipboard operation
loopy copied to clipboard

[callables] Overwriting dtypes at a call-site should be illegal

Open kaushikcfd opened this issue 4 years ago • 0 comments

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.

kaushikcfd avatar Jun 25 '21 15:06 kaushikcfd