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

Add new expr simplification pass distributeGcdRemainderDivMod #35

Merged
merged 16 commits into from
Mar 21, 2023

Conversation

zasdfgbnm
Copy link
Collaborator

@zasdfgbnm zasdfgbnm commented Mar 20, 2023

This pass helps View, Transpose, Welford, and Matmul. It does simplification like:

(a * 8 + 7) / 32  -->  (a * 8) / 32
(a * 8 + 7) % 32  -->  (a * 8) % 32 + 7

For the above example, other passes can further simplify the expr as:

(a * 8) / 32  -->  a / 4
(a * 8) % 32 + 7  -->  (a % 4) * 8 + 7

Example kernel diff:

TODO:

  • update all the failing assertCUDAKernel tests😵‍💫😵‍💫😵‍💫😵‍💫

Base automatically changed from more-proves to main March 20, 2023 18:58
@zasdfgbnm
Copy link
Collaborator Author

zasdfgbnm commented Mar 20, 2023

FIXME: in https://www.diffchecker.com/0rILZnqM/, why i17526 / i3683 is not simplified?

Edit: fixed

@zasdfgbnm zasdfgbnm marked this pull request as ready for review March 20, 2023 21:34
@zasdfgbnm zasdfgbnm requested a review from naoyam March 20, 2023 21:34
Copy link
Collaborator

@naoyam naoyam left a comment

Choose a reason for hiding this comment

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

LGTM

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