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

Why not bindgen the whole mkl.h in wrapper? #52

Open
tuxzz opened this issue Aug 22, 2020 · 2 comments
Open

Why not bindgen the whole mkl.h in wrapper? #52

tuxzz opened this issue Aug 22, 2020 · 2 comments

Comments

@tuxzz
Copy link

tuxzz commented Aug 22, 2020

I want to use mkl_sparse_* functions but I found that intel-mkl-sys only bindgened mkl_vml.h and mkl_vsl.h.

What's the purpose that not bindgen the whole mkl.h in wrapper?
May I create a PR to fix it?

@termoshtt
Copy link
Member

What's the purpose that not bindgen the whole mkl.h in wrapper?

It intends not to include unnecessary function or structs. Using rust-bindgen, it will expose ALL functions defined in C header including those defined in e.g. stdio.h. VML and VSL headers are clean enough not to use white-listing like, e.g. I did for cuda-driver-sys, and they are in needs of rust-ndarray/ndarray-linalg#178

May I create a PR to fix it?

Welcome :) You may find another bindgen.sh example in cuda-runtime-sys and blas-lapack-rs/lapack-sys#11

@Andlon
Copy link

Andlon commented Sep 24, 2021

This is the purpose of our mkl-sys crate (not published to crates.io). Although not by any means perfect (MKL is really unfriendly to wrapping), it has allowed us to build wrappers for e.g. sparse solvers and sparse linear algebra.

I'd like to avoid an MKL "ecosystem split", and I could imagine contributing what we've done to this crate, as well as future improvements.

However, for us a concern of major importance is the fact that the download feature is on by default. I think for us to contribute our work (if you're interested) I'd really like to urge you to make this off by default. I'll open a separate issue for this, however.

EDIT: Issue is here: #67

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

No branches or pull requests

3 participants