inducer / inducer/loopy

`realize_reduction` requires a typed kernel for comparative operations

Open
#633 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
636
Forks
81
Avg merge
1d 19h
Merged PRs (30d)
7

Description

```python
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](https://github.com/inducer/loopy/blob/main/loopy/library/reduction.py#L202=) 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?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.