ztellman / calx

not under active development - idiomatic opencl bindings for clojure

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Potemkin import-fn issues

bmillare opened this issue · comments

Hey Zach,

I'm trying to update your calx code to work with 1.3. The binding vars stuff is pretty easy to fix but the import-fn stuff is giving me problems.

Its giving me:
;user=> (clojure.repl/pst)
NullPointerException
java.util.concurrent.ConcurrentHashMap.get (ConcurrentHashMap.java:768)
clojure.lang.Namespace.find (Namespace.java:188)
clojure.core/find-ns (core.clj:3657)
clojure.core/the-ns (core.clj:3689)
clojure.core/intern (core.clj:5561)
potemkin.namespace/import-fn (namespace.clj:16)
clojure.lang.Var.invoke (Var.java:409)
clojure.lang.Var.applyTo (Var.java:518)
clojure.lang.Compiler.macroexpand1 (Compiler.java:6320)
clojure.lang.Compiler.macroexpand (Compiler.java:6381)
clojure.lang.Compiler.macroexpand (Compiler.java:6383)
clojure.lang.Compiler.eval (Compiler.java:6449)

I tried using the most recent version of potemkin but I'm still getting the same error. You know what's going on here?

Best,
Brent

Hello.
I've too made an attempt to migrate calx to clojure 1.3 (and also 1.4). While I have no errors as at start up and when running kernels, the data in calx buffers is getting corrupted and/or is un-retrievable...

Zach, a moment of your time to point me where this could be stemming from would be great.

most concise example of corruption:
(use 'calx)
(with-cl
(enqueue-read (wrap [1.0 2.0 3.0] :float32)))
Ref to native buffer: (4.6006E-41 4.6007E-41 5.831E-42)

(with-cl
(enqueue-read (wrap [1 2 3] :int32)))
Ref to native buffer: (16777216 33554432 50331648)

I've tried various combination of gloss types,
I've tried coercing types in the wrap'ed array.
I've tried other versions of gloss... all with no luck.

repo here: https://github.com/LudoTheHUN/calx/tree/calx_on_cloj1.4
commit with edits here:
LudoTheHUN@082d629

Thanks in advance.

My comment above was resolved here:
clj-commons/gloss#9