uncomplicate

zendevil 2020-12-08T05:37:18.051500Z

I have disabled sip. I’m getting NullPointerException when using transfer! or view with the tensor object. Here’s my code:

;; == this works
(def t1 (tensor 3))
(shape t1)
(data-type t1)
(layout t1)
;; =======

;; == this gives NullPointerException
(view t1)
(transfer! [1 3 5] t1)
;; =======
Here’s the full stack trace
Numbers.java: 1068  clojure.lang.Numbers/ops
              Numbers.java:  121  clojure.lang.Numbers/isPos
                  core.clj: 2884  clojure.core/take/fn
              LazySeq.java:   42  clojure.lang.LazySeq/sval
              LazySeq.java:   51  clojure.lang.LazySeq/seq
                   RT.java:  535  clojure.lang.RT/seq
                  core.clj:  137  clojure.core/seq
                  core.clj: 3133  clojure.core/dorun
                  core.clj: 3148  clojure.core/doall
                  core.clj: 3148  clojure.core/doall
                tensor.clj:  507  uncomplicate.diamond.internal.dnnl.tensor/eval76732/fn
              MultiFn.java:  234  clojure.lang.MultiFn/invoke
                pprint.clj:   40  cider.nrepl.pprint/pr/fn
                  AFn.java:  152  clojure.lang.AFn/applyToHelper
                  AFn.java:  144  clojure.lang.AFn/applyTo
                  core.clj:  665  clojure.core/apply
                  core.clj: 1973  clojure.core/with-bindings*
                  core.clj: 1973  clojure.core/with-bindings*
               RestFn.java:  425  clojure.lang.RestFn/invoke
                pprint.clj:   37  cider.nrepl.pprint/pr
                pprint.clj:   29  cider.nrepl.pprint/pr
                  Var.java:  393  clojure.lang.Var/invoke
                 print.clj:  224  nrepl.middleware.print/wrap-print/fn/print
                 print.clj:  148  nrepl.middleware.print/send-nonstreamed/print-key/fn
                 print.clj:  147  nrepl.middleware.print/send-nonstreamed/print-key
                  core.clj: 2742  clojure.core/map/fn/fn
             protocols.clj:   49  clojure.core.protocols/iter-reduce
             protocols.clj:   75  clojure.core.protocols/fn
             protocols.clj:   75  clojure.core.protocols/fn
             protocols.clj:   13  clojure.core.protocols/fn/G
                  core.clj: 6884  clojure.core/transduce
                  core.clj: 6870  clojure.core/transduce
                 print.clj:  156  nrepl.middleware.print/send-nonstreamed
                 print.clj:  138  nrepl.middleware.print/send-nonstreamed
                 print.clj:  174  nrepl.middleware.print/printing-transport/reify
                caught.clj:   58  nrepl.middleware.caught/caught-transport/reify
           track_state.clj:  228  cider.nrepl.middleware.track-state/make-transport/reify
    interruptible_eval.clj:  114  nrepl.middleware.interruptible-eval/evaluate/fn
                  main.clj:  442  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