HackerTrans
TopNewTrendsCommentsPastAskShowJobs

thomaskoopman

no profile record

Submissions

Show HN: FFTN, faster than FFTW in 700 lines of C

gitlab.sac-home.org
7 points·by thomaskoopman·9 เดือนที่ผ่านมา·0 comments

comments

thomaskoopman
·ปีที่แล้ว·discuss
Quaternions (when viewed as vectors) are not linear functions, but the arguments to linear functions. You can add them: (a + bi + cj + dk) + (a' + b'i + c'j + d'k) = (a + a') + (b + b')i + (c + c')j + (d + d')k, and multiply them by a scalar: lambda * (a + bi + cj + dk)= (lambda * a) + (lambda * b)i + (lambda * c)j + (lambda * d)k. An example of a linear function on quaternions is the zero function. After all, zero(q + q') = 0 = 0 + 0 = zero(q) + zero(q'), and zero(lambda * q) = 0 = lambda * 0 = lambda * zero(q).

Matrices and quaternions take different approaches to describing rotations: a matrix sees a rotation as a linear function, and quaternions see rotations as a group (confusingly represented with matrices, this field is called representation theory if you want to know more).

So the answer to your question: there are linear functions that quaternions cannot describe. And quaternions can only describe a very specific class of linear functions (with some rather complicated maths behind them).
thomaskoopman
·ปีที่แล้ว·discuss
Yes, but quaternions of unit length are a representation of the rotation group in 3D space ( https://en.wikipedia.org/wiki/Representation_theory_of_SU(2)... ), which is how they are used for rotations.
thomaskoopman
·ปีที่แล้ว·discuss
Very cool, fast and looks like it should vectorize too. Do you have a jump function for parallel seeding?

How did you come up with this, some number-theoretic basis or more experimental?
thomaskoopman
·ปีที่แล้ว·discuss
A matrix is a representation of a linear function (e.g. a function that plays nice with + and scalar multiplication). A specific subset can be used to describe rotations in 3D space. Quaternions can (arguably) do this better. But quaternions cannot be used to describe any linear function. So I do not think this makes sense for LLMs.
thomaskoopman
·ปีที่แล้ว·discuss
Do you have any tips for writing research papers in a more accessible way?
thomaskoopman
·ปีที่แล้ว·discuss
I think it depends more on the ratio between access time and how often you use the data. Adding two arrays that fit in L1 is already limited by access time. On Zen3, we can add two 32-byte vectors per cycle, but only store one of these per cycle. For matrix multiplication, we can do the two additions per cycle (or really c <- a * b + c) because we have to do multiple operations once we have loaded the data into registers.

I can see it be useful for data sets of a few dozen MBs as well.