Skip to content
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

Track dialects in passes #11

Open
rikhuijzer opened this issue Oct 31, 2024 · 0 comments
Open

Track dialects in passes #11

rikhuijzer opened this issue Oct 31, 2024 · 0 comments

Comments

@rikhuijzer
Copy link
Owner

rikhuijzer commented Oct 31, 2024

Currently, calling --convert-mlir-to-llvmir on say

func.func @main {
  arith.constant 0 : i32
  return
}

will give a weird error in XRCF, but it should actually keep track of dialects like MLIR:

$ mlir-translate --mlir-to-llvmir tmp.mlir
tmp.mlir:6:10: error: Dialect `arith' not found for custom op 'arith.constant'
    %0 = arith.constant 0 : i32

EDIT: I'm gonna let this sit for a while. I'm not sure whether dialects are the best way to handle this. The main idea of dialects is that the op prefix (like arith.constant) makes it easy to group operations, but then there is llvm.mlir.constant which means that preferably we want nested namespaces.

So essentially it's not a dialect but a namespace, so a module?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant