Closed doofin closed 5 years ago
Can you print out what files do you have in your /usr/lib/python3.7/site-packages/torch-1.0.0-py3.7-linux-x86_64.egg/lib
?
Additionally there is a bug with SWIG with Java on x64 machines -- you should patch this https://github.com/ctongfei/nexus/blob/master/torch/swig-patch/fix-long.patch to your SWIG before attempting the build.
And it seems that you don't have CUDA installed.
This torch backend is currently a work-in-progress -- lots of methods are implemented as ???
now so please be patient until I update.
When everything is complete you don't need to build it yourself -- the binding will be packed into the jar and you just need to add a dependency.
ls /usr/lib/python3.7/site-packages/torch-1.0.0-py3.7-linux-x86_64.egg/torch/lib/include
ATen c10 caffe2 pybind11 TH THC THCUNN torch
I don't have GPU and cuda,Maybe the directory for new torch version has changed? Thanks for your efforts! It seems there is currently no usable auto diff framework in Scala ecosystem (not sure if dl4j implements autodiff, a project called scorch needs manual diff)
BTW,for the facade generation,JNA and JNAerator is also an option
If you don't have CUDA, you can try to modify the build.sh
script to make it work (by removing dependencies to CUDA). This script works under my current environment (Ubuntu 18.04, CUDA 10.0, PyTorch 1.0).
You can just play with the nexus-diff
autodiff package -- it is already usable (not complete, a lot of ops unimplemented) with the nexus-jvm-backend
backend (just very slow, but it works). See the example XOR code.
JNA and JNAerator is much slower than JNI (generated by SWIG). We'll use JNI in this project.
Contributions are welcome!
Identical to #27 . Should be fixed now.
when building torch backend it gives :
torch : /usr/lib/python3.7/site-packages/torch-1.0.0-py3.7-linux-x86_64.egg/