torch icon indicating copy to clipboard operation
torch copied to clipboard

non-abi version of libtorch

Open zia1138 opened this issue 4 years ago • 8 comments
trafficstars

Curious if the non-abi version of libtorch is supported and if there's any easy way to get install_torch to download it e.g. from https://download.pytorch.org/libtorch/cpu/libtorch-shared-with-deps-1.7.0%2Bcpu.zip

I'm in a cluster environment and am getting /lib64/libm.so.6: version `GLIBC_2.23' not found See also: https://github.com/pytorch/pytorch/issues/38765

Thanks!

zia1138 avatar Apr 27 '21 00:04 zia1138

I haven't tried yet, sorry.

But you might be able to install by setting TORCH_HOME env var to a directory containing the non-abi version of libtorch and copying the liblantern binary to that same folder. You can download lantern using the corresponding lik here:

https://github.com/mlverse/torch/blob/a79996bafef2fe15e489a743e1e5b51789178d5b/R/install.R#L31

Let me know if that works, happy to do further debugging.

dfalbel avatar Apr 27 '21 11:04 dfalbel

I tried the environment variable TORCH_HOME, but it now it segfaults. I wonder if it's abi incompatibility with liblantern.so. It's not a huge deal. I'll explore some alternatives.

zia1138 avatar Apr 27 '21 21:04 zia1138

OK, I can try providing a non ABI compiled version of liblantern.so What I would try doing is adding an entry here: https://github.com/mlverse/torch/blob/master/.github/workflows/lantern.yaml so we also have a non abi build of lantern uploaded...

dfalbel avatar Apr 27 '21 23:04 dfalbel

That's great! Thank you! If there's a link where I can download, I can give it a try on our slurm cluster.

zia1138 avatar Apr 28 '21 20:04 zia1138

Hi @zia1138

You can find a build artifact here: https://github.com/mlverse/torch/actions/runs/796163101 Let me know if that works for you. I am not sure how to test exactly, but I think adding this is enough for getting non-ABI buids: https://github.com/mlverse/torch/pull/538/files#diff-b7e57aaf544f3f121e49b4f8d32c9ed5d0e4a59dd0dcc815dd4faf2398c8897dR11

Also this is only for the CPU build, we can proceed for GPU builds if this works.

dfalbel avatar Apr 29 '21 13:04 dfalbel

I got the artifact from: https://storage.googleapis.com/torch-lantern-builds/refs/heads/non-abi/latest/LinuxNonABI-cpu.zip and set the TORCHHOME environment variable. No segfault this time. Still need to test a bit more.
Any chance you can build the cu101 version?

zia1138 avatar Apr 30 '21 20:04 zia1138

I'm also getting `GLIBC_2.23' not found. Is there a way to install torch with an older version of glibc?

ablack3 avatar Sep 17 '21 18:09 ablack3

I'm getting 'GLIBC_2.27 not found' when trying to install torch on a centos7 slurm cluster. @dfalbel @zia1138 @ablack3 I was just wondering if you were able to resolve this?

edit: for anyone having issues installing Torch on centOS, I installed the rocker/ml singularity and then installed Torch inside the active singularity.

d-mcgrath avatar Apr 10 '22 20:04 d-mcgrath