Fork me on GitHub
#uncomplicate
<
2020-10-30
>
Vishal Gautam17:10:11

Hi I purchased the linear algebra + deep learning book. I am trying to set up a deps.edn project. Here is how it looks so far

{:paths
 ["src"]
 :deps
 {org.clojure/clojure              {:mvn/version "1.10.1"}
  uncomplicate/neanderthal         {:mvn/version "0.38.0"}
  org.bytedeco/mkl-platform-redist {:mvn/version "2020.3-1.5.4"}}
 :aliases
 {:server {:main-opts ["-m" "app.core"]}
  :dev {:extra-paths ["config/dev" "env/dev"]
        :extra-deps {org.clojure/tools.namespace      {:mvn/version "1.0.0"}}}
  :socket-repl {:jvm-opts ["-Dclojure.server.repl={:port,50505,:accept,clojure.core.server/repl}"]}}}
and in my app.core file
(ns app.core)

(defn -main []
  (println "Hello deep learning"))
when i run clj -A:server i get this error
Error building classpath. Could not find artifact org.jcuda:jcuda-natives:jar:apple-x86_64:11.0.0 in central ()
Can someone help?

dorab17:10:00

@vishal.gautam Are you on a Mac? Apple does not support CUDA (See https://neanderthal.uncomplicate.org/articles/getting_started.html ) You may need to exclude the jcuda libs on MacOS. See the issue at https://github.com/uncomplicate/neanderthal/issues/41

Vishal Gautam18:10:39

@dorab thank you I got it working but i am getting one issue

Syntax error compiling at (native.clj:1:1).
No namespace: uncomplicate.neanderthal.internal.host.mkl

Vishal Gautam18:10:34

This error only occurs when I am trying to require the uncomplicate.neanderthal.native name space

dorab18:10:19

Not really sure. But I'm guessing it has to do with finding a usable MKL on your system. Perhaps https://dragan.rocks/articles/20/Clojure-Neanderthal-MKL-acceleration-out-of-the-box will be of help?

blueberry22:10:16

@vishal.gautam It's probably MKL that's missing, as @dorab mentioned. Please read https://neanderthal.uncomplicate.org/articles/getting_started.html. You have to have MKL somewhere available, and it can be done in many standard ways on your OS. You're on macOS: the key is to disable SIP, which is Apple's mechanism ni newer macOS version that blocks many normal unix dev tools. Short: provide MKL either globally, or as a dependenscy to bytedeco's MKL jar, disable SIP, and you're good to go. It's best to first test it with https://github.com/uncomplicate/neanderthal/tree/master/examples/hello-world leiningen project, and then experiment with a custom deps.edn.

Vishal Gautam19:10:56

Thank you for such detailed explanation. I am going to try it now