-
Notifications
You must be signed in to change notification settings - Fork 22
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
Add a generator of C interfaces #378
Conversation
Great stuff! I wondered if we could consider calling the C++ libraries directly (given that we only need to support a well-defined subset of types, maybe it's possible to do the ABI conversions ourselves and treat the entry-points as C functions), but a generator is pretty great as well.
No, I attempted packaging the oneAPI Base Toolkit in Yggdrasil at some point, but the installer is really redistribution-unfriendly. This is also why we're using Conda right now, much to my dismay. |
@amontoison : This is very cool! |
@maleadt @pengtu @michel2323 @kballeda I finalized the script The script uses the headers of the new artifact Before that
At the end of the process, these files are concatenated with In the current state, we have a C interface for almost all BLAS and LAPACK routines. For SPARSE MKL, I don't know how to interface the type If the sparse part works, we'll be able to use the |
@amontoison we are looking into enabling sparse primitives - sparse_gemv and sparse_gemm. |
@maleadt : Could you merge this PR to the oneAPI.jl repo or need additional reviews/tests? |
Thanks @amontoison! |
@amontoison I didn't realize you didn't use Clang.jl to parse the headers. Doing this string-based seems really fragile; did you consider using Clang.jl? |
@maleadt Using Clang.jl is the best solution but I don't know how we can parse |
@maleadt @pengtu @michel2323
I worked on a generator of C interfaces today.
It takes as input a C++ header file and generate the C interfaces with a C header.
You have an example with
onemkl_lapack.cpp
andone_lapack.h
.Even if it's not perfect, it will highly help to interface the libraries of oneAPI.
Do we have a Julia artifact that contains all
hxx
/hpp
such that I can test it a different library?