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

Try building a non-ABI version of liblantern #538

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open

Try building a non-ABI version of liblantern #538

wants to merge 8 commits into from

Conversation

dfalbel
Copy link
Member

@dfalbel dfalbel commented Apr 29, 2021

No description provided.

@hsbadr
Copy link
Collaborator

hsbadr commented Jan 8, 2022

@dfalbel JFYI. I'm building my own libtorch and liblantern because the prebuilt binaries cause segmentation fault on my system, mainly because I build R from source code using Intel MKL and compilers; I think this also improves the performance but I haven't run any benchmarks yet. Are you willing to allow building libtorch from source code? I set TORCH_HOME environment variable to avoid the built-in installation.

@dfalbel
Copy link
Member Author

dfalbel commented Jan 8, 2022

Yeah, I think TORCH_HOME is the right option if you want to build LibTorch from source. We currently don't provide any helpers for building it in this repo.

One thing that we should probably make easier is to provide an env var so that users installing torch from source could specify that they want to build Lib Lantern from source instead of downloading the pre-built binaries. Currently the only way is to clone the repository, build lantern and then install the R package - which is not very simple.

@hsbadr
Copy link
Collaborator

hsbadr commented Jan 8, 2022

One thing that we should probably make easier is to provide an env var so that users installing torch from source could specify that they want to build Lib Lantern from source instead of downloading the pre-built binaries. Currently the only way is to clone the repository, build lantern and then install the R package - which is not very simple.

Yeah, that's exactly what I do. I run a script to clone the sources, build libtorch followed by liblantern and then copy them to $TORCH_HOME. It'd be nice to build liblantern from source code when installing torch, but right now building them externally keeps the directory structure as expected (all libs and headers are relative to $TORCH_HOME). If you build it internally, we need to think about where to install it: should it be copied to $TORCH_HOME or in the package directory?

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

Successfully merging this pull request may close these issues.

2 participants