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

Build basic MLIR C-API libraries #69

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mofeing
Copy link

@mofeing mofeing commented Jan 6, 2024

I'm interested in using your XLA builds in Julia for the MLIR.jl project, but we need the MLIR-C API to be included.

This PR adds the following Bazel targets:

  • @llvm-project//mlir:CAPIIR
  • @llvm-project//mlir:CAPIInterfaces
  • @llvm-project//mlir:CAPIExecutionEngine

Adding these targets shouldn't increase the size of the binary, since they are just some C-wrappers over the C++ code.

@josevalim
Copy link
Contributor

Wouldn’t it make more sense to have a build of MLIR without XLA? :)

@mofeing
Copy link
Author

mofeing commented Jan 6, 2024

We already have that, and while we would like a XLA without LLVM/MLIR (which we could link to Julia's LLVM), I guess it's not entirely possible because libxla_extension.so exports all symbols.

That's why I'm trying with this other option of using libxla_extension also as our MLIR lib.

@josevalim
Copy link
Contributor

If they export all symbols, I guess they would conflict with each other when loading the .so? I am asking because we might be going on a similar path soon. :)

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

Successfully merging this pull request may close these issues.

None yet

2 participants