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

Move demotion passes to GlobalOptimization. #14815

Merged
merged 5 commits into from
Aug 26, 2023
Merged

Conversation

stellaraccident
Copy link
Collaborator

@stellaraccident stellaraccident commented Aug 25, 2023

The global optimizations really depend on the flow level demotion passes. Moves them to the right place. Also restores the ordering of the strip assertions pass so that it can guide optimizations.

Renames old -iree-flow-(demote|promote)-* flags to -iree-opt-(demote|promote)-* flags now that they are just part of the rest of the global optimizations.

Internally, renames "HighLevelOptimizations" to "GlobalOptimizations" for coherence.

This lets us enable consteval on llam2 7b qi4/f16 models and drops latency from 14.3ms -> 11.9ms. Mostly it is small scalar-level evaluations but it is also eliminating a 250MiB f16 transpose in both first/second that I expect is a main culprit.

Fixes #14835.

The global optimizations really depend on the flow level demotion passes. Moves them to the right place. Also restores the ordering of the strip assertions pass so that it can guide optimizations.

Renames old `-iree-flow-(demote|promote)-*` flags to `-iree-opt-(demote|promote)-*` flags now that they are just part of the rest of the global optimizations.

Internally, renames "HighLevelOptimizations" to "GlobalOptimizations" for coherence.

Fixes #14835.
@stellaraccident stellaraccident changed the title TEST: Enable constant eval on llama2 Move demotion passes to GlobalOptimization. Aug 26, 2023
@stellaraccident stellaraccident marked this pull request as ready for review August 26, 2023 00:48
@stellaraccident stellaraccident enabled auto-merge (squash) August 26, 2023 01:18
@stellaraccident stellaraccident merged commit 585e5ca into main Aug 26, 2023
55 of 56 checks passed
@stellaraccident stellaraccident deleted the test_llama2_consteval branch August 26, 2023 01:37
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.

Consteval crash on evaluation of a tensor<f64>
2 participants