-
Notifications
You must be signed in to change notification settings - Fork 30
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
Transform to lower packs/unpacks without transpose, except when the packing occurs on a constant #972
Conversation
bc16ef5
to
63bbceb
Compare
This is now ready for final review (excepting a clear PR description). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Logic looks solid, I'd still cleanup the tests a bit.
Performance on the lora-fragment benchmark in use for Openvino:
EDIT: make more accurate as pointed out by Adam below.
|
`> NO-OV MLIR vs. MANUAL MLIR compares TPP-MLIR vs TPP-MLIR with this new rewrite. Kind of, NO-OV MLIR still has runtime packing due to weights passed as arguments. |
@adam-smnk, @rengolin, in case of no further comments I will merge this tomorrow, Sept 25th. |
Thank you for the thorough review, @adam-smnk ! I think I have addressed everything, though will wait a couple more hours before I merge. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the tweaks 👍
Looks good
A transform that enables selectively "reverting" packing on
linalg.generic
operands and unpacking on the generic's results by loweringtensor.pack
totensor.expand_shape
with identity permutation andtensor.unpack
totensor.collapse_shape
with identity permutation.The new pass
-lower-packs-unpacks-without-transpose
does this reverting on all (compatible) packed/unpackedlinalg.generic
operands/results, except if they are constants. Similarly, the CLI flag--lower-pack-unpack-without-transpose
enables this pass in the default pipeline.