uncomplicate

v 2020-10-30T17:34:11.022600Z

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 (<https://repo1.maven.org/maven2/>)
Can someone help?

dorab 2020-10-30T17:59:00.023900Z

@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

v 2020-10-30T18:12:39.024500Z

@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

v 2020-10-30T18:14:34.025200Z

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

dorab 2020-10-30T18:20:19.026400Z

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?

2020-10-30T22:58:16.031400Z

@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.

v 2020-10-31T19:55:56.032700Z

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