uncomplicate

zendevil 2020-12-07T04:04:07.047200Z

clCreateCommandQueueWithProperties is not supported

zendevil 2020-12-07T04:04:19.047400Z

I’m using the opencl factory to create a tensor like so:

(opencl/with-default
  (with-release
    [opencl-factory (opencl-float *context* *command-queue*)]
    (tensor opencl-factory
            (desc [2 3 2]))))
But I’m getting the following error:
The function clCreateCommandQueueWithProperties is not supported

                   CL.java:   -2  <http://org.jocl.CL/clCreateCommandQueueWithPropertiesNative|org.jocl.CL/clCreateCommandQueueWithPropertiesNative>
                   CL.java: 5388  <http://org.jocl.CL/clCreateCommandQueueWithProperties|org.jocl.CL/clCreateCommandQueueWithProperties>
                  impl.clj:  510  uncomplicate.clojurecl.internal.impl/command-queue*
                  impl.clj:   -1  uncomplicate.clojurecl.internal.impl/command-queue*
                  core.clj:  879  uncomplicate.clojurecl.core/command-queue
                  core.clj:  837  uncomplicate.clojurecl.core/command-queue
                  core.clj:  881  uncomplicate.clojurecl.core/command-queue
                  core.clj:  837  uncomplicate.clojurecl.core/command-queue
                      REPL:   60  clotorch.flight.core/eval119139
                      REPL:   60  clotorch.flight.core/eval119139
             Compiler.java: 7177  clojure.lang.Compiler/eval
             Compiler.java: 7132  clojure.lang.Compiler/eval
                  core.clj: 3214  clojure.core/eval
                  core.clj: 3210  clojure.core/eval
                  main.clj:  437  clojure.main/repl/read-eval-print/fn
                  main.clj:  437  clojure.main/repl/read-eval-print
                  main.clj:  458  clojure.main/repl/fn
                  main.clj:  458  clojure.main/repl
                  main.clj:  368  clojure.main/repl
               RestFn.java:  137  clojure.lang.RestFn/applyTo
                  core.clj:  665  clojure.core/apply
                  core.clj:  660  clojure.core/apply
                regrow.clj:   18  refactor-nrepl.ns.slam.hound.regrow/wrap-clojure-repl/fn
               RestFn.java: 1523  clojure.lang.RestFn/invoke
    interruptible_eval.clj:   79  nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:   55  nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:  142  nrepl.middleware.interruptible-eval/interruptible-eval/fn/fn
                  AFn.java:   22  clojure.lang.AFn/run
               session.clj:  171  nrepl.middleware.session/session-exec/main-loop/fn
               session.clj:  170  nrepl.middleware.session/session-exec/main-loop
                  AFn.java:   22  clojure.lang.AFn/run
               Thread.java:  748  java.lang.Thread/run
How to fix this error?

zendevil 2020-12-07T04:49:14.047700Z

since I have opencl 1.2 running on macos

zendevil 2020-12-07T04:49:20.048100Z

I changed to

zendevil 2020-12-07T04:49:21.048300Z

(opencl/with-default (with-release [opencl-factory (dnnl-factory context command-queue-1)] (tensor opencl-factory 2 2 [0.3 0.9 0.3 0.9])))

zendevil 2020-12-07T04:50:16.048500Z

still getting

zendevil 2020-12-07T04:50:17.048700Z

The function clCreateCommandQueueWithProperties is not supported CL.java: -2 http://org.jocl.CL/clCreateCommandQueueWithPropertiesNative CL.java: 5388 http://org.jocl.CL/clCreateCommandQueueWithProperties impl.clj: 510 uncomplicate.clojurecl.internal.impl/command-queue* impl.clj: -1 uncomplicate.clojurecl.internal.impl/command-queue* core.clj: 879 uncomplicate.clojurecl.core/command-queue core.clj: 837 uncomplicate.clojurecl.core/command-queue core.clj: 881 uncomplicate.clojurecl.core/command-queue core.clj: 837 uncomplicate.clojurecl.core/command-queue REPL: 63 clotorch.flight.core/eval120743 REPL: 63 clotorch.flight.core/eval120743 Compiler.java: 7177 clojure.lang.Compiler/eval Compiler.java: 7132 clojure.lang.Compiler/eval core.clj: 3214 clojure.core/eval core.clj: 3210 clojure.core/eval main.clj: 437 clojure.main/repl/read-eval-print/fn main.clj: 437 clojure.main/repl/read-eval-print main.clj: 458 clojure.main/repl/fn main.clj: 458 clojure.main/repl main.clj: 368 clojure.main/repl RestFn.java: 137 clojure.lang.RestFn/applyTo core.clj: 665 clojure.core/apply core.clj: 660 clojure.core/apply regrow.clj: 18 refactor-nrepl.ns.slam.hound.regrow/wrap-clojure-repl/fn RestFn.java: 1523 clojure.lang.RestFn/invoke interruptible_eval.clj: 79 nrepl.middleware.interruptible-eval/evaluate interruptible_eval.clj: 55 nrepl.middleware.interruptible-eval/evaluate interruptible_eval.clj: 142 nrepl.middleware.interruptible-eval/interruptible-eval/fn/fn AFn.java: 22 clojure.lang.AFn/run session.clj: 171 nrepl.middleware.session/session-exec/main-loop/fn session.clj: 170 nrepl.middleware.session/session-exec/main-loop AFn.java: 22 clojure.lang.AFn/run Thread.java: 748 java.lang.Thread/run

zendevil 2020-12-07T07:16:06.049200Z

changed to with-default-1, and have this now:

zendevil 2020-12-07T07:16:23.049400Z

(opencl/with-default-1 (with-release [opencl-factory (opencl-float context command-queue-1)] #_(tensor opencl-factory [2 2] :float :nc)))

zendevil 2020-12-07T07:16:34.049700Z

which gives the error;

zendevil 2020-12-07T07:16:58.050Z

OpenCL error: CL_INVALID_COMMAND_QUEUE.
   {:name "CL_INVALID_COMMAND_QUEUE",
    :code -36,
    :type :opencl-error,
    :details "(wrap d)"}
                 utils.clj:   41  uncomplicate.clojurecl.internal.utils/error
                 utils.clj:   -1  uncomplicate.clojurecl.internal.utils/error
                  info.clj:   21  <http://uncomplicate.clojurecl.info/queue-device|uncomplicate.clojurecl.info/queue-device>
                  info.clj:  906  <http://uncomplicate.clojurecl.info/queue-device|uncomplicate.clojurecl.info/queue-device>
               clblast.clj: 2329  uncomplicate.neanderthal.internal.device.clblast/eval118667/clblast-float
                      REPL:   64  clotorch.flight.core/eval120834
                      REPL:   62  clotorch.flight.core/eval120834
             Compiler.java: 7177  clojure.lang.Compiler/eval
             Compiler.java: 7132  clojure.lang.Compiler/eval
                  core.clj: 3214  clojure.core/eval
                  core.clj: 3210  clojure.core/eval
                  main.clj:  437  clojure.main/repl/read-eval-print/fn
                  main.clj:  437  clojure.main/repl/read-eval-print
                  main.clj:  458  clojure.main/repl/fn
                  main.clj:  458  clojure.main/repl
                  main.clj:  368  clojure.main/repl
               RestFn.java:  137  clojure.lang.RestFn/applyTo
                  core.clj:  665  clojure.core/apply
                  core.clj:  660  clojure.core/apply
                regrow.clj:   18  refactor-nrepl.ns.slam.hound.regrow/wrap-clojure-repl/fn
               RestFn.java: 1523  clojure.lang.RestFn/invoke
    interruptible_eval.clj:   79  nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:   55  nrepl.middleware.interruptible-eval/evaluate
    interruptible_eval.clj:  142  nrepl.middleware.interruptible-eval/interruptible-eval/fn/fn
                  AFn.java:   22  clojure.lang.AFn/run
               session.clj:  171  nrepl.middleware.session/session-exec/main-loop/fn
               session.clj:  170  nrepl.middleware.session/session-exec/main-loop
                  AFn.java:   22  clojure.lang.AFn/run
               Thread.java:  748  java.lang.Thread/run

zendevil 2020-12-07T07:38:55.050600Z

(tensor
 native-float
 [1 2] :float :nc) 
;; gives the error.

  No implementation of method: :diamond-factory of protocol:#'uncomplicate.diamond.internal.protocols/DiamondFactoryProvider found for class: uncomplicate.neanderthal.internal.host.mkl.MKLRealFactory