LaurentMazare / tch-rs

Rust bindings for the C++ api of PyTorch.
Apache License 2.0
4.37k stars 348 forks source link

Missing binary for macOS (x86_64) with `download-libtorch` feature #897

Open cuducos opened 1 month ago

cuducos commented 1 month ago

I understand this is probably a @pytorch issue, but with download-libtorch I cannot run things locally with 2.4.0:

error: failed to run custom build command for `torch-sys v0.17.0`

Caused by:
  process didn't exit successfully: `/Users/cuducos/Library/CloudStorage/Dropbox/Projects/airnope/target/debug/build/torch-sys-6f2b19bbf05ccb75/build-script-build` (exit status: 1)
  --- stdout
  cargo:rerun-if-env-changed=LIBTORCH_USE_PYTORCH
  cargo:rerun-if-env-changed=LIBTORCH
  cargo:rerun-if-env-changed=TORCH_CUDA_VERSION

  --- stderr
  Error: https://download.pytorch.org/libtorch/cpu/libtorch-macos-x86_64-2.4.0.zip: status code 403

It makes sense: we can see here that this URL does not exist (maybe it should even be a 404, not 403, but anyway…).

Should tch-rs do something about it? Maybe check the URL before the download and offer a friendly error message if the binary does not exist for a given arch and os combo.

cuducos commented 1 month ago

Just adding to the context: builds for macOS on x86 are gone for good.