Live data from Hacker News

Show HN: Matrix Multiplication with Half the Multiplications

github.com

71–80 of 85 posts

Re: Show HN: Matrix Multiplication with Half the Multiplications

#71
post #70

Earlier quoted context omitted.

You are correct, I apologize for the confusion! :)

Assuming your claim is not equivalent to "matrix multiplication is in O(n^2)", then it is false assuming conventional mathematics (i.e. uncountable sets exist), because j in R is uncountable, and algorithms are countable...

Are algorithms on a Real RAM [1] countable? That would mean that there are constants you can't express.

[1] https://en.wikipedia.org/wiki/Real_RAM

Re: Show HN: Matrix Multiplication with Half the Multiplications

#73
post #70

Earlier quoted context omitted.

You are correct, I apologize for the confusion! :)

Assuming your claim is not equivalent to "matrix multiplication is in O(n^2)", then it is false assuming conventional mathematics (i.e. uncountable sets exist), because j in R is uncountable, and algorithms are countable...

You do not need a different algorithm for each real. Just take the algorithm that proves the statement for rational p. It proves the statement for all reals bigger than p. (hence having as many algorithms as there are rational (countably many) is enough)

Re: Show HN: Matrix Multiplication with Half the Multiplications

#74
post #58

This is very cool and a real interesting read! For those in the comments confused about how this is better, the paper is talking about synthesizing matrix multiplication pipelines in hardware, like an FPGA or ASIC. On a CPU or GPU you won't notice because adds and multiplications take the same amount of time generally, but multiplication units takes up many more transistors, so if you can reduce the circuit complexit…

Whoah, this is what Unified Algebra is all about! http://www.cs.toronto.edu/~hehner/UA.pdf

So what's the difference between this unified algebra, and universal algebra[0]?

[0] https://en.wikipedia.org/wiki/Universal_algebra

Re: Show HN: Matrix Multiplication with Half the Multiplications

#75
post #20
post #6

Earlier quoted context omitted.

IMHO, for fixed-point MM accelerators, there is no catch, I think it's an overlooked algorithm. It's based on an algorithm by Winograd who coincidentally also proposed another unrelated algorithm that later became very popular for CNN acceleration which would take some visibility away from this other algorithm by Winograd... But that is speculative

LLM hype and this submission in particular keep making me think of a lecturer I had for Topics in Large Dimensional Data Processing , circa 2016: as I recall he was enthusiastically adamant that the most important thing, breakthroughs etc., in years/decades to come was going to be faster matrix operations. Anyway, I'm pretty sure I recognise FIP (not FFIP of course) from that course. I wish I could remember his name,…

Unless he was a guest lecturer, if the course was for credit, wouldn't his name appear on your official transcript?

Re: Show HN: Matrix Multiplication with Half the Multiplications

#76
post #75
post #20

Earlier quoted context omitted.

LLM hype and this submission in particular keep making me think of a lecturer I had for Topics in Large Dimensional Data Processing , circa 2016: as I recall he was enthusiastically adamant that the most important thing, breakthroughs etc., in years/decades to come was going to be faster matrix operations. Anyway, I'm pretty sure I recognise FIP (not FFIP of course) from that course. I wish I could remember his name,…

Unless he was a guest lecturer, if the course was for credit, wouldn't his name appear on your official transcript?

I don't think so, this may be the case in your country of course. I may well have recorded it in my notes if I dig them out, but this was a fourth year course and they certainly degraded over the years.

Re: Show HN: Matrix Multiplication with Half the Multiplications

#77
post #20

Earlier quoted context omitted.

LLM hype and this submission in particular keep making me think of a lecturer I had for Topics in Large Dimensional Data Processing , circa 2016: as I recall he was enthusiastically adamant that the most important thing, breakthroughs etc., in years/decades to come was going to be faster matrix operations. Anyway, I'm pretty sure I recognise FIP (not FFIP of course) from that course. I wish I could remember his name,…

Maybe I’m joking, but: our society is just a vehicle for economics at this point, our economy is built around science, our science has mostly been turned into observations about engineering, some time ago we changed all of engineering into differential equations, and differential equations can be solved by discretizing them and doing linear algebra, and most of linear algebra can be done with matrix multiplications (…

So, what you're saying is ...

... that the Matrix creates the world around us.

Thanks.

Re: Show HN: Matrix Multiplication with Half the Multiplications

#78
post #3

I'm surprised this actually works, usually detecting whether to use multiplication or addition is slower than simply using multiplication. Especially if it's massive amounts of work being done in parallel.

Wonder how well it compares to openblas and cublas.

Re: Show HN: Matrix Multiplication with Half the Multiplications

#79
post #73
post #70

Earlier quoted context omitted.

Assuming your claim is not equivalent to "matrix multiplication is in O(n^2)", then it is false assuming conventional mathematics (i.e. uncountable sets exist), because j in R is uncountable, and algorithms are countable...

You do not need a different algorithm for each real. Just take the algorithm that proves the statement for rational p. It proves the statement for all reals bigger than p. (hence having as many algorithms as there are rational (countably many) is enough)

Then that’s basically saying there is a O(n^2) algorithm which I dealt with in my first sentence.

Re: Show HN: Matrix Multiplication with Half the Multiplications

#80
post #18

This looks pretty cool! What's the catch? e.g. why isn't this already implemented in accelerators, is it really just a forgotten algorithm, or this has some implications on the cost of building the accelerator or else?

It's not just a software algorithm. It's a hardware architecture optimization. To benefit, you have to build hardware that matches the dimensions of the algorithm. That's an expensive commitment.

Not so much in FPGA ... although I'm not sure top end FPGAs would beat Nvidia TPUs even with this algorithm, and even if cost were not a consideration.
Post reply on HN