loopy icon indicating copy to clipboard operation
loopy copied to clipboard

`realize_reduction` requires a typed kernel for comparative operations

Open zachjweiner opened this issue 2 years ago • 0 comments

import loopy as lp

knl = lp.make_kernel(
    "{[i]: 0 <= i < n }",
    """
    z = max([i], a[i])
    """,
    lang_version=(2018, 2)
)
knl = lp.realize_reduction(knl)

dies here because the dtype is None.

I'm guessing this wants a symbolic smallest/largest number node that is made concrete after type inference. Are there any similar examples of things that remain abstract until after type inference/later on in codegen?

zachjweiner avatar Jun 20 '22 21:06 zachjweiner