Skip to content

Add layout-optimization infrastructure to handle kernel changes during hoisting #1892

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

j2kun
Copy link
Collaborator

@j2kun j2kun commented Jun 6, 2025

Rebased on #1889

Partial progress toward #1888

This PR adds:

  • An attribute to specify the chosen kernel for layout-optimizer
  • A new op interface that allows layout-optimizer to handle all convert_layout op hoisting generically
  • converting existing hoisters for arith ops to use the interface
  • expansion of the layout-optimizer to incorporate the cost of the kernel

For next PR:

  • an implementation of the interface for matvec when alignment is unchanged
  • baseline selection of kernel costs

@j2kun j2kun marked this pull request as draft June 6, 2025 23:15
@j2kun j2kun force-pushed the mnist-kernel-hoisting branch 2 times, most recently from dee5e58 to 5e0c3bb Compare June 10, 2025 00:04
@j2kun j2kun requested a review from asraa June 10, 2025 18:48
@j2kun j2kun marked this pull request as ready for review June 10, 2025 18:48
@j2kun j2kun changed the title Expand convert_layout hoisting to cover matvec Add layout-optimization infrastructure to handle kernel changes during hoisting Jun 10, 2025
@j2kun j2kun force-pushed the mnist-kernel-hoisting branch 2 times, most recently from a7bb8fe to 4d1320d Compare June 11, 2025 05:27
Copy link
Collaborator

@asraa asraa left a comment

Choose a reason for hiding this comment

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

Thank you for pushing more of this infra in!

@j2kun j2kun force-pushed the mnist-kernel-hoisting branch from ef57e38 to 8e2f1a3 Compare June 12, 2025 03:36
@j2kun j2kun force-pushed the mnist-kernel-hoisting branch from 8e2f1a3 to e303f07 Compare June 12, 2025 03:37
Copy link
Collaborator

@asraa asraa left a comment

Choose a reason for hiding this comment

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

Curious about the attribute verifier...

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