C api mlir

Hi, I am starting to use MLIR for my purpose. I wanted to use C API provided by MLIR. Can someone help in providing some examples to go over ?

A good starting point are likely the C API unit-tests: llvm-project/mlir/test/CAPI at main · llvm/llvm-project · GitHub

Note that the C API has been developed for the purpose of bindings (python ones in particular): it may not be complete or amazingly ergonomic. It also probably does not allow you to create your own dialect, etc.

1 Like