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

DialectHandle on external dialects #47

Open
vchuravy opened this issue Jan 20, 2024 · 1 comment
Open

DialectHandle on external dialects #47

vchuravy opened this issue Jan 20, 2024 · 1 comment

Comments

@vchuravy
Copy link
Member

Not sure what the best way to handle this is, but maybe we should have a global dictionary instead of constructing the lookup on the fly?

julia> MLIR.IR.context!(MLIR.IR.Context()) do
           dialect = MLIR.IR.get_or_load_dialect!("jlir")
           sprint(show, dialect)
       end
ERROR: UndefVarError: `mlirGetDialectHandle__jlir__` not defined
Stacktrace:
 [1] getproperty
   @ ./Base.jl:31 [inlined]
 [2] MLIR.IR.DialectHandle(s::Symbol)
   @ MLIR.IR ~/src/MLIR/src/IR/IR.jl:65
 [3] get_or_load_dialect!(handle::MLIR.IR.DialectHandle)
   @ MLIR.IR ~/src/MLIR/src/IR/IR.jl:127 [inlined]

In contrast to:

julia> MLIR.IR.context!(MLIR.IR.Context()) do
           dialect = MLIR.IR.get_or_load_dialect!(MLIR.IR.DialectHandle(Brutus.BrutusAPI.mlirGetDialectHandle__jlir__()))
       end
@vchuravy
Copy link
Member Author

Also see #49 as an example of a extension dialect

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