uncomplicate / neanderthal

Fast Clojure Matrix Library
http://neanderthal.uncomplicate.org
Eclipse Public License 1.0
1.06k stars 56 forks source link

Use f-ordered result array and a more comparable gemm invocation for ND4J #46

Closed treo closed 6 years ago

blueberry commented 6 years ago

Thank you for this update. I'll add gemm in addition to mmul, instead of replacing it. Neanderthal's mm does much more than gemm. Being polymorphic not only regarding the first matrix, but also the second, it does lots of things. gemm is, on the other hand, a static method that straightforwardly does gemm. Nevermind, Neanderthal still comes out ahead, so why not accept gemm? :)

I'll add your changes as addition to the existing code outside this PR. When can I expect the release of the beta2 of ND4J, so I can update the project to use ND4J for the recent bugfixes related to this? Snapshot does not work for me, and will probably not work for other users, since it picks up OpenBLAS instead of MKL.

treo commented 6 years ago

With snapshots, and probably with any upcoming versions you've got to explicitly tell ND4J (or rather JavaCPP which can pickup any BLAS Library via the Openblas Bindings) what you'd like to use: https://github.com/bytedeco/javacpp-presets/tree/master/openblas

For my own tests I used -Dorg.bytedeco.javacpp.openblas.load=mkl_rt.

Concerning the next release, all that I'm aware of is that it isn't going to be very soon.

blueberry commented 6 years ago

Thanks for the info. I'll use snapshots.

blueberry commented 6 years ago

Do you have any maven repository with snapshots that I can use? If I switch to the snapshot of ND4J, that means that whoever would like to try these benchmarks would have to build the whole DL4J/ND4J themselves, which hardly anyone is willing to do...

treo commented 6 years ago

See https://github.com/treo/benchmarking_nd4j/blob/master/pom.xml. I'm using the snapshots repository there.

blueberry commented 6 years ago

Unfortunately, leiningen complains about the security certificate of sonatype's snapshots repository and refuses to download from it...

I'll leave 1.0.0-beta for now in the repo, but hope someone will resolve this.

treo commented 6 years ago

Huh, that weird. As far as I can tell leiningen should be using java's trust store to check them, and that certificate should be valid with any up to date java jre, i.e. java 8 update version >= 31.

blueberry commented 6 years ago

Yes, but it complains and the jar is not downloaded. Anyway, I've updated the project.clj, and commented out the offending part, so anyone can try, and may have more luck with this.