Skip to content

DialectHandle on external dialects #47

@vchuravy

Description

@vchuravy

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions