-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
[Draft] CodeGen_MLIR: Add initial MLIR CodeGen #7587
base: main
Are you sure you want to change the base?
Conversation
cbc1a0b
to
129964e
Compare
I look forward to reading the PR and will try to do so soon. MLIR definitely now has enough prebuilt dialect support to be able to support Halide well. The main issue for re: adding MLIR support in main is that it adds a significantly large dependency to the build. This has a cost on CI/testing. The main advantage of MLIR would be as a fairly configurable backend to target a broad variety of dialects flexibly, specifically ML operation sets that end up on TPU hardware and such. |
I would like to see a quick readme with minimal info on how you set up/installed MLIR and possibly a shell script that generates something through this path and compiles it with mlir-opt or similar. |
129964e
to
ddbc238
Compare
@zvookin I have updated the pull request. I have added In my project, I use MLIR and CIRCT to generate generic RTL code which I wrap with Xilinx-specific wrappers, and I have also implemented a Halide runtime ( In the code in this pull request, when Therefore my question is, should we consider the MLIR code as an "accelerator" that can only run loops, or also code that can also run on a host?
In my system (Fedora) I just installed |
Hey, just wanted to check in and see where this PR stands. Is it waiting on feedback? |
Indeed. I have open questions about how to better integrate the MLIR Codegen. See my previous message for the details. |
Ah, gotcha -- unfortunately @zvookin has been away on leave for a couple of months and it looks like no one took over the responsibility here. I'll bring this up and see who can take it over. |
Also adds compile_to_mlir methods to Func and Pipeline.
ddbc238
to
d37ec4a
Compare
No code changes, just a rebase. |
Initial implementation. Just a proof-of-concept to show that MLIR generation is possible and quite straightforward.
It uses the following MLIR dialects:
arith
,func
,memref
,scf
,vector
.Future work:
affine
dialect instead ofscf
'sif
,for
, and memory load/stores to take advantage ofaffine
transformations and optimizations.