facebookresearch / diffkt

A framework for automatic differentiation in Kotlin
MIT License
59 stars 6 forks source link

Check out pre-built Java native interfaces #8

Open gafter opened 3 years ago

gafter commented 3 years ago

@ToddSmall called my attention to http://bytedeco.org/ which provides pre-built Java native interfaces to many popular native libraries. We should check it out and see how valuable it might be to us.

ToddSmall commented 3 years ago

I made a little example of using Bytedeco's pre-built Java native interface for MKL here.

gafter commented 3 years ago

@ToddSmall is proposing to prepare a PR that illustrates the approach for a small subset of our native code. We will need to evaluate whether this will make fbcode integration (and maintenance) more or less difficult. /cc @shannyang

shannyang commented 3 years ago

So I think this shouldn't add any issues to the fbcode integration that we weren't already aware of, but there's some work to do before we can properly add it. Fortunately it's all stuff we have to do anyway:

I'll try this in a toy project later today and see if there's anything else to be said!

edit 8/5 EOD: Bytedeco doesn't seem to have the same dependency conflicts as other libraries did, which is great! There are still issues at runtime, and transitive dependencies (mkl -> javacpp) don't seem to be automatically included as expected. Will look more into this.