On 4/5/23 07:53, juzhe.zh...@rivai.ai wrote:
 >> So fusion in this context is really about identifying cases where two
configuration settings are equivalent and you "fuse" them together.
Presumably this is only going to be possible when the vector insns are
just doing data movement rather than actual computations?

If my understanding is correct, I can kind of see why you're doing
fusion during phase 3.  My sense is there's a better way, but I'm having
a bit of trouble working out the details of what that should be to
myself.  In any event, revamping parts of the vsetvl insertion code
isn't the kind of thing we should be doing now.

The vsetvl demand fusion happens is not necessary "equivalent", instead, we
call it we will do demand fusion when they are "compatible".
And the fusion can happen between any vector insns including data movement
and actual computations.
I wasn't precise enough in my language, sorry about that. "compatible" would definitely have been a better choice of words on my part.



What is "compatible" ??  This definition is according to RVV ISA.
For example , For a vadd.vv need a vsetvl zero, 4, e32,m1,ta,ma.
and a vle.v need a vsetvl zero,4,e8,mf4,ta,ma.

According to RVV ISA:
vadd.vv demand SEW = 32, LMUL = M1, AVL = 4
vle.v demand RATIO = SEW/LMUL = 32, AVL = 4.
So after demand fusion, the demand becomes SEW = 32, LMUL = M1, AVL = 4.
Such vsetvl instruction is configured as this demand fusion, we call it "compatible"
since we can find a common vsetvl VL/VTYPE status for both vadd.vv and vle.v
Thanks. Yea, that makes sense. Maybe a better way to state what I was thinking was that for pure data movement we have degrees of freedom to adjust the vector configuration to match something else and thus remove a vsetvl.

jeff

Reply via email to