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
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions tsfc/loopy.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.


return knl, event_name


Expand Down
Loading