Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There are 3 matrices in question: A, B and C. They have dimensions (M * K), (K * N) and (M * N) respectively.

They are laid out, rather than nested arrays, as a single continuous collection of bytes that can be interpreted as having a matrix shape. That's where the `m * N + n` comes from (m rows down and n cols in)

  C' = alpha C + A.B
This is the 'generalised matrix-matrix multiplication' (GEMM) operation. It's multiplying the matrices A and B, adding it to a scales version of C and inserting it back into C. Setting alpha to 0 gets you basic matmul


Thank you for this detailed explanation. Making the matrix one-dimensional makes sense from the performance standpoint.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: