Not exactly what you asked, but something that you may consider: GoMLX 
<https://github.com/gomlx/gomlx>. It's an accelerated ML and Math library 
that uses XLA <https://github.com/openxla/xla> --> it just-in-time compiles 
a computation graph to CPU/GPU (and hopefully soon TPU). It powers 
Jax/Tensorflow and is really fast (after the first execution).

Now, while pretty rich set of functionality, it's not a super-set of Gonum 
(it has some stuff not available in Gonum also). If anything is missing, 
but is supported by XLA <https://www.tensorflow.org/xla/operation_semantics>, 
I would be happy to add. Plus it's well documented (see tutorial 
<https://github.com/gomlx/gomlx/blob/main/examples/tutorial/tutorial.ipynb>). 
Storage is row-major for 2d-tensors by default -- but internally it may 
reshuffle storage depending on optimization.

ps.: It's a biased suggestion (plus a bit of advertisement) because I 
created the project.

On Saturday, August 26, 2023 at 2:14:22 PM UTC+2 Jason E. Aten wrote:

> I do alot of stats/numerical stuff but I haven't tried gonum until now.
>
> Yesterday I went to port a bunch of C code that uses BLAS/LAPACK
> into Go, and thought I'd try it (Gonum) out.  Now the logic is the original
> code is very hairy, and does delicate operations like a bunch
> of QR decompositions... in short, I don't want to mess with the
> algorithm at all, I just want to port it to Go. The C original code runs 
> fine against
> OpenBLAS. Of course, being numeric code, it all assumes column-major
> Fortran style matrices.
>
> But when I tried to run the same logic on Gonum, I was hitting issues
> left and right. At first I thought they were bugs in Gonum. But then
> I realized, by default Gonum is assuming that your matrices will
> be row-major (C-style).
>
> There's almost zero documentation for gonum of these kinds of
>  assumptions and even less about how to use
> Gonum.... Like how do you switch between the Go and C BLAS implementation?
> Not documented; that I can find. You would think this would be front and 
> center. Ugh.
>
> Anyway: somebody here probably knows-- does Gonum also support column-major
> matrices?  In the Go BLAS, or in a cgo binding to OpenBLAS?
>
> With Bewildered Thanks.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/3b21ad7c-6bf2-4806-8d16-e5967a7bbe0fn%40googlegroups.com.

Reply via email to