-
Notifications
You must be signed in to change notification settings - Fork 57
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
Merged
Merged
Changes from 56 commits
Commits
Show all changes
71 commits
Select commit
Hold shift + click to select a range
0d83653
init; changelog
paul0403 fb9c6db
boilerplate
paul0403 62a3f5a
missing namespace
paul0403 81e6e97
missing include
paul0403 6242a0b
typo
paul0403 7c149d0
(cherry pick) Add ForwardOp Bufferization
tzunghanjuang 5504e29
move over Tzunghan's old work
paul0403 fcc0424
adjoint op
paul0403 a310d05
backprop op
paul0403 2e26140
add adjoint test with multiple results
paul0403 b7f62ae
some cleanup on backprop
paul0403 d113b4a
clean up backprop
paul0403 6282518
test file rename
paul0403 277f547
changelog
paul0403 5419116
update backprop test
paul0403 19e25f8
do not manually copy the cotangents for backprop
paul0403 0962b81
use ValueRange instead of vector
paul0403 7273e4e
update comment about backprop's mem write
paul0403 4714f3c
move over Tzunghan's forward and reverse
paul0403 4d995e7
try CI
paul0403 d037193
format
paul0403 14b8599
remove old gradient bufferization
paul0403 b98c9ea
clean prints
paul0403 d3389a9
Merge remote-tracking branch 'origin/main' into paul0403/new_bufferiz…
paul0403 89e0bbd
format
paul0403 491cfa1
add gradient preprocessing test
paul0403 c7b57f2
easier on the eyes
paul0403 128978b
reverse op preprocessing test
paul0403 bc3caf9
add bufferization test for forward and reverse
paul0403 1eb49c1
add post processing test for forward and reverse
paul0403 eff06f4
Merge remote-tracking branch 'origin/main' into paul0403/new_bufferiz…
paul0403 a194c06
make most dialects into one-shot-bufferize(dialect)
paul0403 66f043f
a stable version before trying one-shot-bufferize pass
paul0403 e35b25e
Merge remote-tracking branch 'origin/main' into paul0403/new_bufferiz…
paul0403 dd04fb9
change the functionArgTypeConverterFn in gradient bufferization to ta…
paul0403 5e9d75c
use one-shot bufferization in python pipeline
paul0403 e306252
update llvm to the commit that has
paul0403 83f6fc2
add restrict unitattr to the ToTensorOps in gradient lowering pass
paul0403 ffb2c60
GreedyRewriteConfig.enableRegionSimplification is no longer just a pl…
paul0403 1848bed
update TopologicalSortUtils.h location
paul0403 9b090f3
include <variant>
paul0403 93ff924
track llvm and mhlo versions to jax 0.4.32
paul0403 ece1c6d
update llvm and mhlo submodules to jax 0.4.32 versions
paul0403 7dfd0cc
.dep-versions format :sweat-smile:
paul0403 b628f47
enzymestatic-19 -> 20
paul0403 d2bc0b6
MhloQuantToIntConversion is removed
paul0403 3790a68
`translateModuleToLLVMIR` got a new argument `disableVerification`
paul0403 f370449
just comment out old bufferization passes in cpp pipeline for now
paul0403 268bc64
update cpp pipeline
paul0403 d3a75ab
turn on `copy-before-write` for async
paul0403 6e0d8df
Merge remote-tracking branch 'origin/main' into paul0403/new_bufferiz…
paul0403 a55e941
Add Tzunghan as author
paul0403 0739553
changelog
paul0403 0fc83a5
Use `eliminate-empty-tensors` pass instead of `empty-tensor-to-alloc-…
paul0403 b8895ed
add `restrict` attr to to_tensor ops in mlir lit test
paul0403 26d8f50
line-too-long on the python bufferization options string
paul0403 d5cdb13
skip upstream ml_dtypes lit test
paul0403 ef323be
Update mlir lit tests impacted by mlir update.
paul0403 692cf99
Merge remote-tracking branch 'origin/main' into paul0403/new_bufferiz…
paul0403 e04b79f
Merge remote-tracking branch 'origin/main' into paul0403/new_bufferiz…
paul0403 1550045
Merge remote-tracking branch 'origin/paul0403/new_bufferize_gradient_…
paul0403 88d28ae
Merge remote-tracking branch 'origin/main' into paul0403/one-shot-buf…
paul0403 80cec7b
format
paul0403 c07b826
just cleaning cache and checking wheels; I will respond to comments o…
paul0403 90a2546
Merge remote-tracking branch 'origin/main' into paul0403/one-shot-buf…
paul0403 1e1435d
add `promote-buffers-to-stack` pass
paul0403 7826069
Merge remote-tracking branch 'origin/main' into paul0403/one-shot-buf…
paul0403 d3132f6
promote buffer to stack pass in cpp pipeline
paul0403 dc2f7b8
move createBufferizationToMemRefPass to the end of the bufferization …
paul0403 2cbdeb8
Merge remote-tracking branch 'origin/main' into paul0403/one-shot-buf…
paul0403 546cd2c
move bufferization-to-memref back
paul0403 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
mlir/include/Gradient/Transforms/BufferizableOpInterfaceImpl.h
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| // Copyright 2024-2025 Xanadu Quantum Technologies Inc. | ||
|
|
||
| // Licensed under the Apache License, Version 2.0 (the "License"); | ||
| // you may not use this file except in compliance with the License. | ||
| // You may obtain a copy of the License at | ||
|
|
||
| // http://www.apache.org/licenses/LICENSE-2.0 | ||
|
|
||
| // Unless required by applicable law or agreed to in writing, software | ||
| // distributed under the License is distributed on an "AS IS" BASIS, | ||
| // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
|
|
||
| #pragma once | ||
|
|
||
| using namespace mlir; | ||
|
|
||
| namespace catalyst { | ||
|
|
||
| namespace gradient { | ||
|
|
||
| void registerBufferizableOpInterfaceExternalModels(mlir::DialectRegistry ®istry); | ||
|
|
||
| } | ||
|
|
||
| } // namespace catalyst |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.