-
Notifications
You must be signed in to change notification settings - Fork 341
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
How to generate pure MLIR? #3083
Comments
You are correct, we are using KRNL operations inside of the EmitMLIR target as some KRNL operations are lowered all the way to LLVM lowering. If you want to intersect with dialects only found in MLIR official repo, then you will need to lower to TOSA or StableHLO. This is a path that we at IBM do not use, so you will have to touch base with developers that use this path to get more info on this. |
KRNL operations are used in the EmitMLIR target. Is it possible to lower all KRNL operations in EmitMLIR target(or EmitPureMLIR target) to pure MLIR? For example: |
I know for a fact that in our path, where we lower down all the way to LLVM dialect, there are certain Krnl Ops that can only be lowered at the same time as LLVM. What you are suggesting is nevertheless interesting, namely that we we don't go that path and are targeting |
When using onnx-mlir, the --EmitMLIR parameter is described as "Lower the input to MLIR built-in transformation dialect," which might lead one to believe it generates pure MLIR code. However, after actual use, it becomes clear that the generated file still contains krnl operations, such as krnl.global, krnl.entry_point, and so on.
So, does onnx-mlir provide a way to generate pure MLIR? Currently, I’m unsure how many krnl operations are included in the MLIR file generated by --EmitMLIR, and how these operations can be converted to MLIR built-in IR. Can anyone help clarify this?
The text was updated successfully, but these errors were encountered: