uncomplicate / deep-diamond

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

java.lang.IllegalAccessError (view does not exist) #1

Closed vaibhawc closed 4 years ago

vaibhawc commented 4 years ago

Occurs with :require [uncomplicate.diamond.native]

blueberry commented 4 years ago

Can you please provide more details? (lein project or alternative, etc.)

vaibhawc commented 4 years ago

Sure, I am using gorilla-repl [org.clojars.benfb/lein-gorilla "0.6.0"] with "0.14.0-alpha".

blueberry commented 4 years ago

Can you please try an ordinary clojure/lein project and share the configuration? Then I'd be able to try this at my machine and either confirm your bug or see what you're missing.

vaibhawc commented 4 years ago

Oh it's a normal lein project only. core.clj.. (ns tinkering.core (:require [uncomplicate.diamond.native :as l]))

If I am doing lein run it gives : Syntax error (IllegalAccessError) compiling at (uncomplicate/diamond/internal/dnnl/factory.clj:1:1). view does not exist when I replace native with dnn, I get this : Syntax error (IllegalAccessError) compiling at (uncomplicate/diamond/dnn.clj:1:1). view does not exist

while it runs fine if I replace native with tensor or metrics.

blueberry commented 4 years ago

Sorry, I can't reproduce it.

vaibhawc commented 4 years ago

Ok, I tried to create a fresh project this time without any plugins. It does require successfully now.. so that's good probably.. but I get this with it : SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Doesn't show this when I replace native with tensor.

Do I have to do/include something extra?

vaibhawc commented 4 years ago

Ok. I just figured out. The original issue occurred when I included an older version of neanderthal (0.31.0) in my project.clj explicitly. The SLF4J thing occurs when either I don't include neanderthal or include the latest version of it (0.36.0). Somehow I thought using neanderthal wouldn't affect anything.

blueberry commented 4 years ago

SLF4J is not an error. It's just a message (by a 3rd party library). Configure logging if you don't want to see it. No-op logging is provided by taoenso timbre library, for exapmle.

vaibhawc commented 4 years ago

Ok, so if I have to use some functions from neanderthal along with those in diamond, I have to make sure I am using correct version of it which is in sync with diamond?