uncomplicate

2017-12-18T01:57:48.000012Z

Though Rather slightly off topic, can I use openblas instead of MKL? If it’s a matter of changing the name of library in loadLibrary… Or else?

2017-12-18T03:01:59.000126Z

@chunsj No. OpenBlas is BLAS only, while MKL also implements LAPACK and lots of other extra functions that Neanderthal uses.

qqq 2017-12-18T11:41:58.000334Z

@blueberry: does either OpenCL, Neandertheral, or Cuda have an webasembly backend ?

qqq 2017-12-18T11:42:19.000253Z

I'm trying to write one piece of code, and have it be able to run both on my dual 1080 GTX as well as webassembly

2017-12-18T11:51:24.000179Z

I don't know.

qqq 2017-12-18T11:55:45.000273Z

okay, but I guess there's no plan to have WebAsembly as a backend to Neanderthal, so I'm on my own if I want this ?

2017-12-18T12:16:36.000121Z

never say never

jsa-aerial 2017-12-18T16:16:10.000307Z

@blueberry I'm on Linux and have MKL for it. I moved all the mentioned libs (literally copied them) to /usr/local/lib. Actually, let me just give the list here of the ones I moved:

jsa-aerial 2017-12-18T16:16:18.000265Z

`libiomp5.so libmkl_avx2.so libmkl_avx512.so libmkl_core.so libmkl_def.so libmkl_intel_lp64.so libmkl_intel_thread.so libmkl_rt.so libmkl_vml_def.so`

jsa-aerial 2017-12-18T16:17:40.000760Z

Most things work, but when playing around with the new flare lib (for rnns) I stumbled at one point upon this:

jsa-aerial 2017-12-18T16:17:48.000616Z

java: symbol lookup error: /tmp/libneanderthal-mkl-0.17.0283772954573527292.so: undefined symbol: vdFmax

jsa-aerial 2017-12-18T16:19:13.000325Z

Presumably I need to move another lib (or more) to where it is visible, but I'm not sure which or what. Thanks for any info!

rustam.gilaztdinov 2017-12-18T18:27:08.000165Z

@blueberry hello! I want to try to execute simple OpenCL function

(with-default
  (with-default-engine
    (asum (fv 1 -2 3))))
but get this exception
Unhandled java.lang.UnsupportedOperationException
The function clCreateCommandQueueWithProperties is not supported
I came across closed issue on github clojurecl repo and try yours suggestions for similar problem, like this:
(def dev (first (devices (first (platforms)))))

(let [err (int-array 1)
      res (CL/clCreateContext nil 1 (into-array [dev]) nil nil err)]
  (println (aget  err 0))
  res)

 => 0
#object[org.jocl.cl_context 0x9ca7a72 "cl_context[0x7fa8c790a500]"]


(defn context-fixed
  ([devices properties ch user-data]
   (clojurecl/context* (into-array cl_device_id devices)
                       (and (seq properties) (clojurecl/context-properties properties))
                       ch user-data))
  ([devices]
   (context-fixed devices nil nil nil))
  ([]
   (with-release [devs (devices)]
     (context-fixed devs))))

(context-fixed (devices (first (platforms))))
=> #object[org.jocl.cl_context 0x78acfdd5 "cl_context[0x7fa8c7a8a660]"]
I work on Mac, opencl version 1.2, this is my clinfo output:
Platform #0
Name: Apple
Version: OpenCL 1.2 (Nov 13 2017 23:06:50)

Device #0
Name: Intel(R) Core(TM) i7-4770HQ CPU @ 2.20GHz
Type: CPU
Version: OpenCL 1.2
Global memory size: 16 GB
Local memory size: 32 kB
Max work group size: 1024
Max work item sizes: (1024, 1, 1)

Device #1
Name: Iris Pro
Type: GPU
Version: OpenCL 1.2
Global memory size: 1 GB 512 MB
Local memory size: 64 kB
Max work group size: 512
Max work item sizes: (512, 512, 512)
I can reproduce exactly the same problem with old 2010 mac on opencl 1.0

2017-12-18T20:31:11.000486Z

@jsa-aerial are you sure you have the latest MKL 2018?

2017-12-18T20:33:28.000079Z

@rustam.gilaztdinov Your mac supports OpenCL 1.2, so you have to use a few legacy functions with -1 suffix in names. See the docs and the hello-world example, particularly https://github.com/uncomplicate/neanderthal/blob/master/examples/hello-world/src/hello_world/opencl1.clj

jsa-aerial 2017-12-18T20:50:12.000294Z

@blueberry No - I just figured that out (before seeing your msg) and now have 2018 installed. I will test and confirm it works. Thanks.

jsa-aerial 2017-12-18T21:01:26.000558Z

@blueberry That was it alright. Confirmed: with new 2018 install all tests pass. Thanks again!

2017-12-18T21:21:17.000578Z

excelente