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

Implements a Loop Fusion Transformation #493

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Conversation

kaushikcfd
Copy link
Collaborator

@kaushikcfd kaushikcfd commented Oct 4, 2021

Draft because:

@kaushikcfd kaushikcfd force-pushed the loop_fusion branch 2 times, most recently from b390c5a to 47d7fa8 Compare October 31, 2021 23:25
@kaushikcfd kaushikcfd force-pushed the loop_fusion branch 2 times, most recently from 5bef1aa to 214e6b9 Compare November 11, 2021 17:14
@kaushikcfd kaushikcfd force-pushed the loop_fusion branch 2 times, most recently from d844444 to 776ee64 Compare November 17, 2021 17:09
@kaushikcfd kaushikcfd force-pushed the loop_fusion branch 4 times, most recently from acbf9a8 to 921ea56 Compare December 10, 2021 05:33
@kaushikcfd kaushikcfd force-pushed the loop_fusion branch 2 times, most recently from a8dfaf0 to 07194cc Compare December 13, 2021 11:34
@kaushikcfd kaushikcfd force-pushed the loop_fusion branch 3 times, most recently from 4c89630 to a6171e2 Compare March 10, 2022 16:43
@kaushikcfd kaushikcfd force-pushed the loop_fusion branch 2 times, most recently from 371632d to d46bfd1 Compare May 6, 2022 17:41
@kaushikcfd kaushikcfd force-pushed the loop_fusion branch 3 times, most recently from f47d987 to 4e97120 Compare May 18, 2022 18:57
candidates = frozenset(candidates)
vng = kernel.get_var_name_generator()
fused_chunks = {}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Note to self: Add a sanity check here if candidates are not a part of kernel.

@inducer
Copy link
Owner

inducer commented Oct 18, 2024

This could be rebased now that the prerequisite generate_loop_schedule_v2 is in.

Comment on lines 527 to 533
raise LoopyError(f"'{iname}' and '{conflict_iname}' "
"cannot fused be fused as they can be nested "
"within one another.")
Copy link
Collaborator

@matthiasdiener matthiasdiener Oct 20, 2024

Choose a reason for hiding this comment

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

Does this need to return an error or could we just remove iname from candidates in this case? (cc illinois-ceesd/mirgecom#1073)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The idea was that this needs to be an error and the caller passes in the candidates appropriately so that the loop nests can be fused with each other.

@kaushikcfd kaushikcfd force-pushed the loop_fusion branch 2 times, most recently from 38a6e02 to b57eb9d Compare October 21, 2024 02:40
Comment on lines +37 to +42
try:
import faulthandler
except ImportError:
pass
else:
faulthandler.enable()
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why would the import fail?

Copy link
Owner

Choose a reason for hiding this comment

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

faulthandler was added in 3.3. Loopy, at one point, targeted Python 2.x.

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.

3 participants