[libre-riscv-dev] [isa-dev] 3D Matrix-style operations / primitives
lkcl
luke.leighton at gmail.com
Wed Sep 18 09:06:19 BST 2019
On Wednesday, September 18, 2019 at 3:41:49 PM UTC+8, Jacob Lifshay wrote:
> mv.x with 8-bit indexes sounds like a good idea.
Yehyeh. I wonder...
>
> assuming a vector of 4x4 matrixes is stored as 4 separate vectors with subvl=4 in struct-of-array-of-struct form (the form I've been planning on using):
> using standard (4+4) -> 4 swizzle instructions with 2 input vectors with subvl=4 and 1 output vector with subvl, a vectorized matrix transpose operation can be done in 2 steps with 4 instructions per step to give 8 instructions in total:
How about 5?
ldimm x4, 0x0004080c # transposition indices, packed 8bit
{SVP.VL=4} MV.X x8, x4, elwidth=8
{SVP.VL=4} MV.X x9, x4, elwidth=8
{SVP.VL=4} MV.X x10, x4, elwidth=8
{SVP.VL=4} MV.X x11, x4, elwidth=8
You remember the idea we had 8 months ago to make the offsets relative to rd?
How about 2? :)
ldimm x4, 0x0004080c # transposition indices, packed 8bit
{SVP.VL=4,SUBVL=4} MV.X x8, x4, elwidth=8
Would that even work? Hm it would work if there was a special bit or opcode to apply the offsets to SUBVL looping but not VL
That would be pretty awesome.
More information about the libre-riscv-dev
mailing list