-
Notifications
You must be signed in to change notification settings - Fork 56
Migrate the entire bufferization pipeline to one-shot bufferization #1751
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
Conversation
instead, the mem write interface can copy for us, and even decide when a copy is needed!
…e_gradient_dialect
llvm/llvm-project#107109 The core dialect conversion no longer tries to materialize ops on the fly during conversion, but rather inserts unrealized conversion casts to be safe, and removes these inverse cast pairs later after the entire conversion is done. The old analysis is removed. Personally I think this is fine, as we end our pipeline with --reconcil-unrealized-casts already. Changes: Catalyst/ConversionTest.mlir and Catalyst/MemrefLoadStoreLoweringTBAA.mlir: changing op order Quantum/ConversionTest.mlir: changing op order; adding two unrealized conversion cast pairs Gradient/ConversionTest.mlir: 5 unused Values are removed
…e_gradient_dialect
…e_gradient_dialect
…dialect' into paul0403/one-shot-bufferize-final
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.
Great, this looks good as is 👌 Just wondering about the other recommended passes in the bufferization docs.
Since this one updates LLVM, let's check the wheels before merging. I will also clean the CI cache under this llvm commit before checking just for absolute certainty. |
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.
🚀
1. Moving ops around due to random ordering updates 2. Revert the inserted unrealized_conversion_casts in #1751 3. llvm.mlir.undef is deprecated, use llvm.mlir.poison instead llvm/llvm-project#125629
Context:
This work is based on #1027.
Now that we have migrated all the individual dialects, we should migrate the entire bufferization pipeline.
The
Quantum
dialect was migrated in #1686 .The
Catalyst
dialect was migrated in #1708 .The
Gradient
dialect was migrated in #1740 .See more context in #1027.
Upstream changes in llvm were required for this bufferization update. As a result, the llvm version and mlir-hlo version were updated to
These are the versions tracked by jax 0.4.32.
These are the earliest jax-tagged versions with complete upstream bufferization changes.
Related GitHub Issues:
[sc-71487]