-
Notifications
You must be signed in to change notification settings - Fork 737
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
CUDA support in PyTorch broken after update to 1.5.9 stable #1376
Comments
Ok this is interesting Still waiting for the cuda kernels to be compiled, but before it errored out immediately... Any idea why it is not extracted like the other files? |
Looks like I forgot to add a line for --- a/pytorch/src/main/java/org/bytedeco/pytorch/presets/torch.java
+++ b/pytorch/src/main/java/org/bytedeco/pytorch/presets/torch.java
@@ -1816,6 +1816,7 @@ public class torch implements LoadEnabled, InfoMapper {
: lib.equals("nvinfer") ? "@.8"
: lib.equals("cufft") ? "@.11"
: lib.equals("curand") ? "@.10"
+ : lib.equals("cusolver") ? "@.11"
: lib.equals("cudart") ? "@.12"
: lib.equals("nvrtc") ? "@.12"
: lib.equals("nvJitLink") ? "@.12"
@@ -1827,6 +1828,7 @@ public class torch implements LoadEnabled, InfoMapper {
: lib.equals("nvinfer") ? "64_8"
: lib.equals("cufft") ? "64_11"
: lib.equals("curand") ? "64_10"
+ : lib.equals("cusolver") ? "64_11"
: lib.equals("cudart") ? "64_12"
: lib.equals("nvrtc") ? "64_120_0"
: lib.equals("nvJitLink") ? "64_120_0" @sbrunk In the meantime, we can work around that by calling |
Thanks @saudet for looking into it and for the workaround. For reference, the workaround needs Also since I have to support CPU only builds as well try {
val cusolver = Class.forName("org.bytedeco.cuda.global.cusolver")
Loader.load(cusolver)
} catch {
case e: ClassNotFoundException => // ignore to avoid breaking CPU only builds
} The only downside is that I need to ensure this is run before any tensor operations. I guess the only way to avoid this is to actually have a patched |
You don't have a "common/utils/whatever" class in which you can put stuff like that in a static { }... ? |
I do, but I wasn't able to find a way to always trigger loading of that utils class containing the static block before doing native calls, due to a combination of me using Scala top-level methods and Scala being really bad with static methods. I've refactored my code now in a way that should trigger the cusolver loading reliably before calling any native code. |
This is now fixed via #1360 |
I'm using
cuda-platform-redist
to avoid being dependent on as system-installed cuda, which was working great using the1.5.9-SNAPHSOT
versions and cuda11.8-8.6
. Now after upgrading to1.5.9
stable in conjuction with the cuda update to12.1-8.9
, something seems to be missing:I've tried going back to cuda
11.8-8.6-1.5.8
(only the native libs via classifier to avoid javacpp-1.5.8 being pulled in), but I got other linking errors due to missing cuda 12 libs, which suggests libtorch is now built against cuda 12:Any ideas?
The text was updated successfully, but these errors were encountered: