Skip to content

Missing pre-built binaries for Windows #1272

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

Closed
statist-bhfz opened this issue Feb 8, 2025 · 10 comments
Closed

Missing pre-built binaries for Windows #1272

statist-bhfz opened this issue Feb 8, 2025 · 10 comments

Comments

@statist-bhfz
Copy link
Contributor

https://torch.mlverse.org/docs/articles/installation.html#pre-built

options(timeout = 600) # increasing timeout is recommended since we will be downloading a 2GB file.
# For Windows and Linux: "cpu", "cu117" are the only currently supported
# For MacOS the supported are: "cpu-intel" or "cpu-m1"
kind <- "cu118"
version <- available.packages()["torch","Version"]
options(repos = c(
  torch = sprintf("https://torch-cdn.mlverse.org/packages/%s/%s/", kind, version),
  CRAN = "https://cloud.r-project.org" # or any other from which you want to install the other R dependencies.
))
install.packages("torch")

Warning in install.packages :
  unable to access index for repository https://torch-cdn.mlverse.org/packages/cu118/0.14.1/src/contrib:
  cannot open URL 'https://torch-cdn.mlverse.org/packages/cu118/0.14.1/src/contrib/PACKAGES'
Warning in install.packages :
  unable to access index for repository https://torch-cdn.mlverse.org/packages/cu118/0.14.1/bin/windows/contrib/4.4:
  cannot open URL 'https://torch-cdn.mlverse.org/packages/cu118/0.14.1/bin/windows/contrib/4.4/PACKAGES'
trying URL 'https://cloud.r-project.org/bin/windows/contrib/4.4/torch_0.14.1.zip'
Content type 'application/zip' length 12854397 bytes (12.3 MB)
downloaded 12.3 MB

packagetorchsuccessfully unpacked and MD5 sums checked

torch package installed from https://cloud.r-project.org/bin/windows/contrib/4.4/torch_0.14.1.zip needs system CUDA 11.8 or 12.4:

> library(torch)
ℹ Additional software needs to be downloaded and installed for torch to work correctly.
Warning message:
ℹ Failed to install torch, manually run `install_torch()`
Unsupported CUDA version "11.7"
Caused by error in `check_supported_version()`:
✖ Unsupported CUDA version "11.7"
ℹ Currently supported versions are: "11.8" and "12.4".
@dfalbel
Copy link
Member

dfalbel commented Feb 8, 2025

Hi @statist-bhfz ,

Thanks for reporting! Can you try kind = "cu124"? I think we stopped building cu118, but forgot to update the docs.

@statist-bhfz
Copy link
Contributor Author

@dfalbel thanks, installation with kind = "cu124" works nice!
Unfortunately, R session crashes immediately when I call any function from torch v.0.14.1 (e.g. torch_tensor(1, device = "cpu")) in RStudio (2024.12.0 Build 467) but not in RGui or Positron IDE. I'll check it on another PC and open an issue in https://github.com/rstudio/rstudio if it happens to be reproducible.

@dfalbel
Copy link
Member

dfalbel commented Feb 10, 2025

Interesting, we might have some clash with a library loaded by RStudio. What's your Rstudio version and Windows version?

@statist-bhfz
Copy link
Contributor Author

I have checked it on 2 PCs, both with Windows 10 22H2 and RStudio 2024.12.0 Build 467.
Also tried to change rendering engine in RStudio (sofrware/desktop OpenGL) with no effect.
Logs at AppData\Local\RStudio\log don't contain any meaningful information, just 2 errors immediately after RStudio start

2025-02-10T06:59:25.545438Z [rsession-andrey] ERROR system error 42 (Unknown error (42)) [str: Модель, len: 12, from: UTF-8, to: ISO8859-1]; OCCURRED AT class rstudio::core::Error __cdecl rstudio::r::util::anonymous-namespace'::iconvstrImpl(const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,const class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > &,bool,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > *) src/cpp/r/RUtil.cpp:268; LOGGED FROM: class rstudio::core::Error __cdecl rstudio::session::modules::spelling::anonymous-namespace'::checkSpelling(const struct rstudio::core::json::JsonRpcRequest &,class rstudio::core::json::JsonRpcResponse *) C:\Users\jenkins\workspace\ide-os-windows\rel-kousa-dogwood\src\cpp\session\modules\SessionSpelling.cpp:225

and no new errors after RStudio crash.

@Arnold-Kakas
Copy link

Hi, I have the same problem with RStudio 2024.09.0 Build 375

@dfalbel
Copy link
Member

dfalbel commented Feb 10, 2025

Does only the GPU version crash? Or does it also happen for the CPU version?

@statist-bhfz
Copy link
Contributor Author

I tried

options(timeout = 600) # increasing timeout is recommended since we will be downloading a 2GB file.
# For Windows and Linux: "cpu", "cu117" are the only currently supported
# For MacOS the supported are: "cpu-intel" or "cpu-m1"
kind <- "cpu"
version <- available.packages()["torch","Version"]
options(repos = c(
    torch = sprintf("https://torch-cdn.mlverse.org/packages/%s/%s/", kind, version),
    CRAN = "https://cloud.r-project.org" # or any other from which you want to install the other R dependencies.
))
install.packages("torch")

It still crashes.

@dfalbel
Copy link
Member

dfalbel commented Feb 13, 2025

Hi @statist-bhfz

Could you try running:

options(timeout = 600) # increasing timeout is recommended since we will be downloading a 2GB file.
# For Windows and Linux: "cpu", "cu117" are the only currently supported
# For MacOS the supported are: "cpu-intel" or "cpu-m1"
kind <- "cpu"
version <- "0.14.1.9000
options(repos = c(
    torch = sprintf("https://torch-cdn.mlverse.org/packages/%s/%s/", kind, version),
    CRAN = "https://cloud.r-project.org" # or any other from which you want to install the other R dependencies.
))
install.packages("torch")

And see if the problem still occurs? Also in a few minutes we should be able to try the cuda version. We had a wrong version of cuDNN installed as a dependency.

@statist-bhfz
Copy link
Contributor Author

statist-bhfz commented Feb 13, 2025

@dfalbel
Thanks, it works! I've checked both "cpu" and "cu124".

@dfalbel
Copy link
Member

dfalbel commented Feb 13, 2025

Awesome!

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

No branches or pull requests

3 participants