uncomplicate / deep-diamond

A fast Clojure Tensor & Deep Learning library
https://aiprobook.com
Eclipse Public License 1.0
432 stars 17 forks source link

Cuda 11 error when initializing gpu #3

Closed kongeor closed 3 years ago

kongeor commented 3 years ago

Hello!

Not sure if this is related to deep-diamond or the cuda libraries but when initializing thegpu:

(defonce gpu (cudnn-factory))

I'm getting the following error:

Execution error (UnsatisfiedLinkError) at jcuda.LibUtils/loadLibrary (LibUtils.java:193).
Error while loading native library "JNvrtc-11.0.0-linux-x86_64"
Operating system name: Linux
Architecture         : amd64
Architecture bit size: 64
---(start of nested stack traces)---
Stack trace from the attempt to load the library as a file:
java.lang.UnsatisfiedLinkError: no JNvrtc-11.0.0-linux-x86_64 in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1867)
    at java.lang.Runtime.loadLibrary0(Runtime.java:870)
    at java.lang.System.loadLibrary(System.java:1122)
    at jcuda.LibUtils.loadLibrary(LibUtils.java:143)
    at jcuda.nvrtc.JNvrtc.<clinit>(JNvrtc.java:59)
    at uncomplicate.clojurecuda.internal.impl$program_STAR_.invokeStatic(impl.clj:153)
    at uncomplicate.clojurecuda.internal.impl$program_STAR_.invoke(impl.clj:147)
    at uncomplicate.clojurecuda.core$program.invokeStatic(core.clj:616)
    at uncomplicate.clojurecuda.core$program.invoke(core.clj:612)
    at uncomplicate.clojurecuda.core$program.invokeStatic(core.clj:621)
    at uncomplicate.clojurecuda.core$program.invoke(core.clj:612)
    at uncomplicate.diamond.internal.cudnn.factory$create_module.invokeStatic(factory.clj:412)
    at uncomplicate.diamond.internal.cudnn.factory$create_module.invoke(factory.clj:411)
    at uncomplicate.diamond.internal.cudnn.factory$eval48024$create_cudnn_factory__48025.invoke(factory.clj:417)
    at uncomplicate.diamond.internal.cudnn.factory$cudnn_factory.invokeStatic(factory.clj:462)
    at uncomplicate.diamond.internal.cudnn.factory$cudnn_factory.invoke(factory.clj:448)
    at nean.dedi$eval48057.invokeStatic(dedi.clj:1)
    at nean.dedi$eval48057.invoke(dedi.clj:9)
    at clojure.lang.Compiler.eval(Compiler.java:7177)
    at clojure.lang.Compiler.eval(Compiler.java:7132)
    at clojure.core$eval.invokeStatic(core.clj:3214)
    at clojure.core$eval.invoke(core.clj:3210)
    at clojure.main$repl$read_eval_print__9086$fn__9089.invoke(main.clj:437)
    at clojure.main$repl$read_eval_print__9086.invoke(main.clj:437)
    at clojure.main$repl$fn__9095.invoke(main.clj:458)
    at clojure.main$repl.invokeStatic(main.clj:458)
    at clojure.main$repl.doInvoke(main.clj:368)
    at clojure.lang.RestFn.invoke(RestFn.java:1523)
    at nrepl.middleware.interruptible_eval$evaluate.invokeStatic(interruptible_eval.clj:79)
    at nrepl.middleware.interruptible_eval$evaluate.invoke(interruptible_eval.clj:55)
    at nrepl.middleware.interruptible_eval$interruptible_eval$fn__921$fn__925.invoke(interruptible_eval.clj:142)
    at clojure.lang.AFn.run(AFn.java:22)
    at nrepl.middleware.session$session_exec$main_loop__1022$fn__1026.invoke(session.clj:171)
    at nrepl.middleware.session$session_exec$main_loop__1022.invoke(session.clj:170)
    at clojure.lang.AFn.run(AFn.java:22)
    at java.lang.Thread.run(Thread.java:748)
Stack trace from the attempt to load the library as a resource:
java.lang.UnsatisfiedLinkError: /tmp/libJNvrtc-11.0.0-linux-x86_64.so: libnvrtc.so.11.0: cannot open shared object file: No such file or directory
    at java.lang.ClassLoader$NativeLibrary.load(Native Method)
    at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1941)
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1824)
...

I'm using [uncomplicate/deep-diamond "0.16.0-alpha"], cuda version is 11.1.1-1 and cudnn is 8.0.5.39-1 on arch linux.

Any help would be greatly appreciated.

Thanks!

blueberry commented 3 years ago

You need CUDA 11.0 on your system.