You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
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. -EmitMLIR means we removed all of the ONNX dialect operation.
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.
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. -EmitMLIR means we removed all of the ONNX dialect operation.
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:
krnl.global() => memref.global() & memref.get_global() ...
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: