Thanks for comments here - will create an issue to track the correct usage of verify on the bindings repo.
@joker-eph I can also describe a bit more some of Julian motivations for playing with MLIR:
one high level motivation for exploring these bindings: there are a number of researchers in the Julia community who are engaging in “soft” compiler research design (e.g. high level AD or probabilistic programming IR design) but want a little more space to move than what is provided by the standard compilation pipeline. (See e.g. Brutus for Julia with an MLIR phase).
There exist mechanisms to manipulate the Julia IR from stable non-compiler dev user land, but they are not fully exposed out of the compiler yet. In addition, the Julia IR is not designed to be extensible or to model semantics which are not intended by the compiler team.
I’m a probabilistic programming researcher - a number of my recent experiments have centered around constructing abstract interpretations to statically verify properties of models and inference algorithms. I’ve found that it’s difficult to express or verify the correctness of the transformations I write on Julia’s SSA form IR and would prefer to express a domain-specific IR which faithfully models the primitives of my languages. Hence, I’m exploring MLIR to determine if it’s suitable for these purposes (and a few others, which I’ll save for another discussion).
There are other users who are interested in designing domain-specific IRs for quantum computing. Similar philosophy and motivations - existing tools are not necessarily sufficient, it would be nice to explore MLIR as an elegant solution.
Despite my rambling, I think this presents a spec of reqs which I should check off:
- C API allows the usage of dialect ops (dialect can be expressed and expanded through TableGen).
- C API allows control over lowering to LLVM IR (conversions possibly written in C++/does this interact with the rewrite system?)
- C API allows the applications of passes (controlled by the pass manager, also from C API).
From the above conversations, it seems like these are supported by the current API - is my understanding correct?