dfalbel / torch

torch from R!
http://dfalbel.github.io/torch
Other
50 stars 5 forks source link

Install instructions #10

Closed dselivanov closed 5 years ago

dselivanov commented 5 years ago

In my case I had to download mkl-dnn from https://github.com/intel/mkl-dnn/releases and put mklml_mac_2019.0.1.20181227/lib/* to /usr/local/lib/libtorch/lib

Also I haven't found (yet) how to build package with cuda support. Will keep posted.

relevant pytorch issue - https://github.com/pytorch/pytorch/issues/14165

dfalbel commented 5 years ago

Yes! I will update the docs. I had to do this in travis too (https://github.com/dfalbel/torch/blob/master/.travis.yml#L17).

Did you figure out how to build the package with cuda support?

dselivanov commented 5 years ago

It builds just fine if you have CUDA installed and uncomment these lines in configure. But I haven't had a chance to test CUDA tensors - it seems we need to add CUDA tensors to pkg wrapper.

dselivanov commented 5 years ago

Actually I forgot one thing - for cuda lib path should be -L/$LIBCUDA/lib64, not -L/$LIBCUDA/lib. I will send PR with fix.

dselivanov commented 5 years ago

BTW interesting idea, mb try to put wget and unzip to configure script to fully automate installation (this won't be possible on CRAN, but I believe pkg doesn't have goal to be released on CRAN)... I will experiment.

dfalbel commented 5 years ago

It's too early to think about releasing on CRAN, but I wouldn't discard it. However from the arrow mailing list:

So we can make the R package to work on Windows and Mac, however, for the R package to be eligible for publication on CRAN, the required Linux libs (i.e. libarrow-dev, arrow-devel) need to be available from the official Debian and/or Fedora repository.

We would need libtorch on apt/yum and this don't depend on us.

TLDR I am for a fully automated installation.