News for hackers. Stuff that matters.
Re:Blaze: A High Performance C++ Math Library by flemishgun on Wednesday April 17, 2024 @11:57AM (#40066483)
I'm surprised people think this, there is also the widely-used Armadillo linear algebra library. In my opinion it has a much nicer syntax.

https://arma.sourceforge.net/

Re:Blaze: A High Performance C++ Math Library by UncleOxidant on Wednesday April 17, 2024 @01:06PM (#40067450)
How's the performance?

EDIT: also being on Sourceforge is kind of a hinderance to discovery these days. I wonder why they chose to be on there instead of github?

Re:Blaze: A High Performance C++ Math Library by stagger87 on Wednesday April 17, 2024 @01:23PM (#40067643)
It's slower but maybe the target audience is different? Armadillo prioritizes MATLAB like syntax. I use armadillo as a stepping stone between MATLAB prototypes and a hand rolled C++ solution, and in many scenarios it can get you a long ways down the road.
Re:Blaze: A High Performance C++ Math Library by flemishgun on Wednesday April 17, 2024 @01:50PM (#40067953)
Tough to say something as blanket as "it's slower"... there are lots of operations in any linear algebra library. It's not a direct comparison with other C++ linear algebra libraries, but hard to say Armadillo is slow based on benchmarks like this:

https://conradsanderson.id.au/pdfs/sanderson_curtin_armadill...

Re:Blaze: A High Performance C++ Math Library by touisteur on Thursday April 18, 2024 @04:50AM (#40074219)
On this exact sequence, is there a LLM of choice that is really performant in this translation task? To armadillo, Eigen, Blaze or even numpy?

I have had very little success with most of the open self-hosted ones, even with my 4xA40 setup, as they either don't know the c++ libraries or generate very good-looking numpy stuff, full of horrors, simple and very very subtle bugs...

Looking for the same thing from any linear algebra library or language to cuda BTW (yes, calls to cu-blas/solver/sparse/tlass/dnn are OK), I haven't found one model able to write cuda code properly - not even kernels themselves but at least chaining library calls.

Probably doesn't exist (invoking Cunningham's Law).

Re:Blaze: A High Performance C++ Math Library by itishappy on Thursday April 18, 2024 @04:49PM (#40080569)
Linear algebra routines seem like one of the worst possible use cases for current LLMs.

Large amounts of repetitive yet meaningfully detailed code. Algorithms that can (and often are) implemented using different conventions or orders of operations. Edge cases out the wazoo.

A solid start seems like it would be using LLMs to write extensive test suites which you can use to verify these new implementations.

Re:Blaze: A High Performance C++ Math Library by touisteur on Friday April 19, 2024 @04:39AM (#40084560)
Yet for me all this C++/CUDA code is a lot of boilerplate to express dense and supposedly very tired concepts. I thought LLMs were supposed to help with the boilerplate. But yeah I guess it won't work.

And yes, it's nice to build unit test and benchmark harnesses. But those were never really such time-wasters for me.