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

Remove unnecessary loopy transform that produces warnings #330

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

connorjward
Copy link
Contributor

I think that this will help fix a lot of the warnings we have been seeing.

@@ -264,9 +264,6 @@ def generate(impero_c, args, scalar_type, kernel_name="loopy_kernel", index_name
preambles=preamble
)

# Prevent loopy interchange by loopy
knl = lp.prioritize_loops(knl, ",".join(ctx.index_extent.keys()))

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could have some performance degradation. For example, for kernels of the form:

u[n,j] = 1.

it is preferred to have "j"-loop nested within "n"-loop. This preferred nesting can be guaranteed by performing appropriate calls to lp.prioritize_loops. Without those priorities loopy might generated code with the loops permuted in an unfavorable manner.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah good to know! I should dig into how we build this ctx.index_extent because it is including 'sibling' loop nests when it shouldn't.

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.

2 participants