-
Notifications
You must be signed in to change notification settings - Fork 45
[Backend][AIE] Experimental mlir-aie codegen using MLIR builder #360
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
parse top module with external functions
TODO: - runtime sequence - fix mismatched copy shape
- skip using external kernels since compilation using aiecc would crash
@Fangtangtang Thanks for contributing! Could you follow this guide to format your code? |
You can just add |
Let me know when you finish the changes |
I’ve finished all the non-streaming cases except for the one using |
fixed |
@EthanMeng324 Could you help review this PR first? |
Sure. |
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 contributing! The code is very well-organized. Just some comments below.
…ion via environment variable - Removed the `tests/dataflow/aie/experimental` folder based on review feedback - Added support for selecting between `aie` and `aie-mlir` codegen via the `USE_AIE_MLIR_BUILDER` environment variable
@EthanMeng324 Thanks for the feedback! I've made the changes accordingly — please take a look and let me know if it now meets your expectations. |
LGTM, thanks! @chhzh123 |
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 migrating the AIE codegen. This PR looks pretty nice! Just some clarification questions listed below
Thanks! I've made the updates based on your suggestions. |
@chhzh123 I've merged |
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.
LGTM. Thanks!
Description
This PR enables MLIR-AIE codegen in Allo by setting up a compatible environment and introducing a lowering method from Allo IR to MLIR-AIE dialects via MLIR context conversion.
Problems
Previously, the environment setup led to conflicts when importing both
allo
andmlir-aie
simultaneously. MLIR-AIE code generation in Allo relied on string matching and substitution.Proposed Solutions
mlir-aie
, andllvm-aie
compilers from the v1.0 release wheels.Examples
Please refer to tests/dataflow/aie/test_vector_add.py for details.
Checklist
Please make sure to review and check all of these items: