[Libre-soc-bugs] [Bug 1155] O(n^2) multiplication REMAP mode(s)
bugzilla-daemon at libre-soc.org
bugzilla-daemon at libre-soc.org
Mon Dec 25 00:44:48 GMT 2023
https://bugs.libre-soc.org/show_bug.cgi?id=1155
--- Comment #28 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
(In reply to Jacob Lifshay from comment #27)
> (In reply to Luke Kenneth Casson Leighton from comment #25)
> > thoughts?
>
> triangles are cool, needs further thought. I'm thinking we'd want a way to
> do new_x = (x + y) % x_sz for diagonal matrix stuff:
yep. see comment #0 3rd option
except it was just going to be sum (x+y).
> new indexes:
> 0 1 2 3 -- rotated right 0
> 5 6 7 4 -- rotated right 1
> A B 8 9 -- rotated right 2
ok *matrix* rotated, iinteresting, like it.
ok so there are also some AV patterns to cover, which are:
| | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | | | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | a |
| 0 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | a | | 0 | | 0 | 1 | 2 | 3 | 4 |
5 | 6 | 7 |
| 1 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | a | | 1 | | 0 | 1 | 2 | 3 | 4 |
5 | 6 | 7 |
| 2 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | | 2 | | 0 | 1 | 2 | 3 | 4 | 5 |
6 | 7 |
| 3 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -> | 3 | | 0 | 1 | 2 | 3 | 4 | 5 |
6 | 7 |
| 4 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | | 4 | | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
7 |
| 5 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | | 5 | | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
7 |
| 6 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | | 6 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
| 7 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | | 7 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 |
which is a "skip=0110" mode with x=7,y=7,z=2 which gives the (twice)
repeated row. i.e where it was *believed* that skip could be dropped,
actually it can't.
hm.
|0:5 |6:11 | 12:17 | 18:20 | 21:23 |24:27 |28:29 |30:31| Mode |
|----- |----- | ------- | ------- | ------ |------|------ |---- | ----- |
|xdimsz|ydimsz| zdimsz | submode2|sk1/invxy|offset|submode|0b11 |bigmul |
5 bits for submodes. sk1 to give that repetition. invxy for mirroring.
(like Indexed Mode which has mirroring)
let's see what is possible:
* submode[0]: standard matrix (x*xdimsz + y) or bigmul (x+y)
* submode[1]: square or triangle
* submode2[0] 0b00 modulo then add offset 0b01 add offset then modulo
* submode2[1:2] triange 0b00 x+y 0b01 y+z 0b10 z+x 0b11 RSVD
square 0b00 x,y,z 0b01 y,x,z 0b10 z,x,y 0b11 z,y,x
i am reasonably certain there are better uses for last 2 bits of submode2
offset is signed. modulo it puts bigger numbers out first
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-soc-bugs
mailing list