FS#77891 - [python-pytorch-opt-cuda] libcudart.so.11.0: cannot open shared object file

Attached to Project: Community Packages
Opened by bruce (brucethemoose) - Saturday, 18 March 2023, 04:32 GMT
Last edited by Toolybird (Toolybird) - Monday, 20 March 2023, 19:04 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Konstantin Gizdov (kgizdov)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

torch.linalg.solve fails on PyTorch from the Arch Linux repo, but works with official CUDA 11.8 release of PyTorch.

Here is a minimum python script I made to reproduce the issue:

```
import torch
M = torch.tensor([[6., 3.], [3., -4.]], device = "cuda")
t = torch.tensor([1., 2.], device = "cuda")
solved = torch.linalg.solve(M, t)
```

And here is my log output, with an updated system install of python-pytorch-opt-cuda and

```
/tmp
❯ pacman -Qs python-pytorch-opt-cuda
local/python-pytorch-opt-cuda 2.0.0rc5-2
Tensors and Dynamic neural networks in Python with strong GPU acceleration (with CUDA and AVX2 CPU
optimizations)

/tmp
❯ python ~/bug.py
Traceback (most recent call last):
File "/home/alpha/bug.py", line 4, in <module>
solved = torch.linalg.solve(M, t)
RuntimeError: Error in dlopen: libcudart.so.11.0: cannot open shared object file: No such file or directory

/tmp
❯ source testvenv/bin/activate.fish

/tmp
testvenv ❯ python ~/bug.py

/tmp
testvenv ❯
```


This is over my head, but it looks like its looking for a CUDA 11 library?
This task depends upon

Closed by  Toolybird (Toolybird)
Monday, 20 March 2023, 19:04 GMT
Reason for closing:  Fixed
Additional comments about closing:  Reporter says "Actually caused by  FS#77911 "
Comment by bruce (brucethemoose) - Saturday, 18 March 2023, 04:34 GMT
(linalg.solve may not be the only function that triggers this dependency issue, but its the only one I've run into, and otherwise large ML projects seem to work).
Comment by bruce (brucethemoose) - Monday, 20 March 2023, 05:45 GMT
Turns out this is caused by to https://bugs.archlinux.org/task/77911?project=5&string=python-pytorch-opt-cuda

Switching from magma to magma-cuda fixed it.

Loading...