Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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.

1 participant