mlverse / torch

R Interface to Torch
https://torch.mlverse.org
Other
483 stars 66 forks source link

Latest CUDA v support for torch? #1082

Closed RishavDaredevil closed 10 months ago

RishavDaredevil commented 11 months ago

Hi i am using Win 11 and have installed cuda v11.8. after installing torch and torch_tensor(1, device = "cuda") I get a error

Error in torch_tensor_cpp(data, dtype, device, requires_grad, pin_memory) : 
  PyTorch is not linked with support for cuda devices
Exception raised from getDeviceGuardImpl at C:\actions-runner\_work\pytorch\pytorch\builder\windows\pytorch\c10/core/impl/DeviceGuardImplInterface.h:319 (most recent call first):
00007FF967EDAD1200007FF967EDACB0 c10.dll!c10::Error::Error [<unknown file> @ <unknown line number>]
00007FF967EDA79E00007FF967EDA750 c10.dll!c10::detail::torchCheckFail [<unknown file> @ <unknown line number>]
00007FF8AE29EC0500007FF8AE29EA60 torch_cpu.dll!at::Context::getDeviceFromPtr [<unknown file> @ <unknown line number>]
00007FF8AE770A4600007FF8AE7709B0 torch_cpu.dll!at::native::to [<unknown file> @ <unknown line number>]
00007FF8AF45A96800007FF8AF454610 torch_cpu.dll!at::compositeimplicitautograd::where [<unknown file> @ <unknown line number>]
00007FF8AF4440ED00007FF8AF40FAC0 torch_cpu.dll!at::compositeimplicitautograd::broadcast_to [<unknown file> @ <unknown line number

Is it because of my Cuda version and if so which version can I use?

dfalbel commented 10 months ago

We just added support for CUDA v11.8, so this should be fixed now in the dev version. You can also install from the pre-built binaries, which includes it's own version of CUDA. You can find more information here.