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

transforms: (set_memory_layout) only apply on streaming_regions #334

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

Conversation

jorendumoulin
Copy link
Contributor

I want to operate this pass only on schedules (after the autoflow scheduler), where the layout is determined automatically according to the access pattern to memory.

This is a first step, to make sure everything keeps working when setting the memory layout at this stage (instead of at linalg.generic level)

Copy link
Contributor

@JosseVanDelm JosseVanDelm left a comment

Choose a reason for hiding this comment

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

That makes perfect sense! Thanks!

)
if not isinstance(generic_op.body.block.first_op, QMacOp):
return
assert isinstance(generic_op := op.body.block.first_op, stream.GenericOp)
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Feels a bit weird to assign a variable inside an assertion?

Suggested change
assert isinstance(generic_op := op.body.block.first_op, stream.GenericOp)
generic_op = op.body.block.first_op
assert isinstance(generic_op, stream.GenericOp)

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