Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set TypeReader.symbols_with_unknown_types at init #632

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zachjweiner
Copy link
Collaborator

This is a blind fix (for the superficial issue, but might be symptomatic of some other problem) for, e.g., the following kernel:

import loopy as lp

knl = lp.make_kernel(
    "{[i, j, k]: 0 <= i, j, k < n }",
    """
    z = simul_reduce(sum, [i, j, k], i + j + k)
    z2 = simul_reduce(sum, [i, j, k], i * j * k)
    """,
    lang_version=(2018, 2)
)

knl = lp.split_reduction_inward(knl, "k")
from loopy.transform.data import reduction_arg_to_subst_rule
knl = reduction_arg_to_subst_rule(knl, ["i", "j"])
knl = lp.realize_reduction(knl)

which throws AttributeError: 'TypeReader' object has no attribute 'symbols_with_unknown_types' from this line. TypeReader is simply missing a symbols_with_unknown_types attribute that its base class has (as well as other attributes TypeInferenceReader sets at __init__, incidentally). (The example is a minimal one derived roughly from test_global_parallel_reduction, for context. The resulting kernel looks fine after this fix.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant