-
Notifications
You must be signed in to change notification settings - Fork 74
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
Documentation: properly document installation from source (without binaries) #1229
Comments
Minor note: one additional, optional dependency is Magma - GPU-based LAPACK which was not included above. If it is not already installed, compile static magma library which is just a standard curl -L https://icl.utk.edu/projectsfiles/magma/downloads/magma-2.7.2.tar.gz | tar xz
cd magma-2.7.2
mkdir build
cd build
cmake -DBUILD_SHARED_LIBS=no -DCMAKE_INSTALL_PREFIX=/usr/local -DCMAKE_POSITION_INDEPENDENT_CODE=ON ..
make -j64 && make install (set |
Thanks @s-u You are right, we should definitely have a single liner FWIW this works for building libtorch (at least on MacOS): And is quite elegant in correctly preparing the libtorch.zip bundle. Of course, you would still need to manually build some of the optional deps. |
@dfalbel thanks, the repo you linked definitely helps! That would have saved me a few hours ;). I wasn't even looking for a single-liner but rather any possible documentation since it's entirely absent. It's all a mess for silly reasons that may not be obvious to you as the author - e.g., I was assuming that lantern is the other lantern project upstream which you included and only digging into the sources revealed that it's a C++ wrapper you wrote as part of torch that you gave the same name and not related to any other lantern :). Also Along those lines: the https://torch.mlverse.org/ website is awesome for users and PR, but I couldn't find links to any actual technical content about the package itself ("getting technical" is not it :P), so I had to essentially reverse-engineer everything. I wouldn't wish to anyone else to have to that that again ;) (And I'd be happy to update that info with more details - like the different CUDA arch flags etc.) |
Indeed we own a lot of improvements regarding documentation for package contributors. We do have an article here: https://torch.mlverse.org/docs/articles/modifying-source-code But for some reason it didn't get indexed in the website menus. |
Since binaries are not provided for current systems (e.g., nVidia only supports CUDA 12.6 on Ubuntu 24.04), it is necessary to build
lantern
and/orlibtorch
from sources, but that is entirely undocumented - both on thetorch
side as well as on thelibtorch
side. It would be nice to have some documentation for both steps and how to properly integrate them such thattorch
doesn't try to look for non-existent binaries.In the hope of being useful, I'm attaching a script with which I managed to get a working
torch
installation from sources, but I had to reverse-engineer ci scripts both inpytorch
and intorch
to do that as neither is documented.The text was updated successfully, but these errors were encountered: