deep-diamond icon indicating copy to clipboard operation
deep-diamond copied to clipboard

NPE occurs when printing tensors if *print-length* is nil.

Open jjttjj opened this issue 3 years ago • 2 comments

Not a high priority issue but I hit this and figured I would log it here.

I believe *print-length* defaults to nil in clojure, but some of the print methods in deep-diamond depend on it being set or they throw an NPE. For example, here: https://github.com/uncomplicate/deep-diamond/blob/41913bf930bad92f8341ad679459827ac61ebf93/src/clojure/uncomplicate/diamond/internal/dnnl/tensor.clj#L521

jjttjj avatar Apr 17 '23 17:04 jjttjj

Thanks. I'll see to fix it in the next release.

blueberry avatar Apr 18 '23 18:04 blueberry

Just hit this also, I think this was the cause in #9 too.

matthewdowney avatar May 01 '23 01:05 matthewdowney

same for me. I am poking arrround , still blindly, in deep diamond, but could not print my tensors, geeting NPEs

Now i see of course, having learned from #22 , That the "hello world" projects sets print-length

I would still think , that code should work even without having any of these set: https://github.com/uncomplicate/deep-diamond/blob/9d6c9bf4411d998243c82c2c62426c6ad497a994/project.clj#L22

behrica avatar May 17 '24 13:05 behrica

Fixed in the newest snapshot.

blueberry avatar May 17 '24 16:05 blueberry