catalyst
catalyst copied to clipboard
[WIP] Migrate to new one-shot bufferization in mlir
Before submitting
Please complete the following checklist when submitting a PR:
-
[ ] All new functions and code must be clearly commented and documented.
-
[ ] Ensure that code is properly formatted by running
make format. The latest version of black andclang-format-14are used in CI/CD to check formatting. -
[ ] All new features must include a unit test. Integration and frontend tests should be added to
frontend/test, Quantum dialect and MLIR tests should be added tomlir/test, and Runtime tests should be added toruntime/tests.
When all the above are checked, delete everything above the dashed line and fill in the pull request template.
Context:
Description of the Change:
As an example, here is how the new bufferization interface is used for mlir's core arith dialect:
https://github.com/llvm/llvm-project/blob/main/mlir/lib/Dialect/Arith/Transforms/BufferizableOpInterfaceImpl.cpp
https://github.com/llvm/llvm-project/blob/main/mlir/include/mlir/Dialect/Arith/Transforms/BufferizableOpInterfaceImpl.h
https://github.com/llvm/llvm-project/blob/7ee0097b486b31be8b9a1750b2cd47580efd9587/mlir/lib/Dialect/Arith/IR/ArithDialect.cpp#L54
Benefits:
Possible Drawbacks:
Related GitHub Issues:
This work is based on #1027